Lines Matching refs:starget
597 ahd_linux_target_in_softc(struct scsi_target *starget) in DEF_SCSI_QCMD()
600 *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata); in DEF_SCSI_QCMD()
603 target_offset = starget->id; in DEF_SCSI_QCMD()
604 if (starget->channel != 0) in DEF_SCSI_QCMD()
607 return &ahd->platform_data->starget[target_offset]; in DEF_SCSI_QCMD()
611 ahd_linux_target_alloc(struct scsi_target *starget) in ahd_linux_target_alloc() argument
614 *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata); in ahd_linux_target_alloc()
617 struct scsi_target **ahd_targp = ahd_linux_target_in_softc(starget); in ahd_linux_target_alloc()
621 char channel = starget->channel + 'A'; in ahd_linux_target_alloc()
627 *ahd_targp = starget; in ahd_linux_target_alloc()
630 int flags = sc->device_flags[starget->id]; in ahd_linux_target_alloc()
633 starget->id, &tstate); in ahd_linux_target_alloc()
637 spi_max_iu(starget) = 0; in ahd_linux_target_alloc()
640 spi_rti(starget) = 0; in ahd_linux_target_alloc()
644 spi_max_qas(starget) = 0; in ahd_linux_target_alloc()
647 spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0; in ahd_linux_target_alloc()
648 spi_min_period(starget) = tinfo->user.period; in ahd_linux_target_alloc()
649 spi_max_offset(starget) = tinfo->user.offset; in ahd_linux_target_alloc()
653 starget->id, &tstate); in ahd_linux_target_alloc()
654 ahd_compile_devinfo(&devinfo, ahd->our_id, starget->id, in ahd_linux_target_alloc()
667 ahd_linux_target_destroy(struct scsi_target *starget) in ahd_linux_target_destroy() argument
669 struct scsi_target **ahd_targp = ahd_linux_target_in_softc(starget); in ahd_linux_target_destroy()
1324 struct scsi_target *starget; in ahd_platform_free() local
1330 starget = ahd->platform_data->starget[i]; in ahd_platform_free()
1331 if (starget != NULL) { in ahd_platform_free()
1332 ahd->platform_data->starget[i] = NULL; in ahd_platform_free()
1677 struct scsi_target *starget; in ahd_send_async() local
1702 starget = ahd->platform_data->starget[target]; in ahd_send_async()
1703 if (starget == NULL) in ahd_send_async()
1707 (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0) in ahd_send_async()
1708 + (spi_qas(starget) ? MSG_EXT_PPR_QAS_REQ : 0) in ahd_send_async()
1709 + (spi_iu(starget) ? MSG_EXT_PPR_IU_REQ : 0) in ahd_send_async()
1710 + (spi_rd_strm(starget) ? MSG_EXT_PPR_RD_STRM : 0) in ahd_send_async()
1711 + (spi_pcomp_en(starget) ? MSG_EXT_PPR_PCOMP_EN : 0) in ahd_send_async()
1712 + (spi_rti(starget) ? MSG_EXT_PPR_RTI : 0) in ahd_send_async()
1713 + (spi_wr_flow(starget) ? MSG_EXT_PPR_WR_FLOW : 0) in ahd_send_async()
1714 + (spi_hold_mcs(starget) ? MSG_EXT_PPR_HOLD_MCS : 0); in ahd_send_async()
1716 if (tinfo->curr.period == spi_period(starget) in ahd_send_async()
1717 && tinfo->curr.width == spi_width(starget) in ahd_send_async()
1718 && tinfo->curr.offset == spi_offset(starget) in ahd_send_async()
1723 spi_period(starget) = tinfo->curr.period; in ahd_send_async()
1724 spi_width(starget) = tinfo->curr.width; in ahd_send_async()
1725 spi_offset(starget) = tinfo->curr.offset; in ahd_send_async()
1726 spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0; in ahd_send_async()
1727 spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0; in ahd_send_async()
1728 spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0; in ahd_send_async()
1729 spi_rd_strm(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_RD_STRM ? 1 : 0; in ahd_send_async()
1730 spi_pcomp_en(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_PCOMP_EN ? 1 : 0; in ahd_send_async()
1731 spi_rti(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_RTI ? 1 : 0; in ahd_send_async()
1732 spi_wr_flow(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_WR_FLOW ? 1 : 0; in ahd_send_async()
1733 spi_hold_mcs(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_HOLD_MCS ? 1 : 0; in ahd_send_async()
1734 spi_display_xfer_agreement(starget); in ahd_send_async()
2367 static void ahd_linux_set_width(struct scsi_target *starget, int width) in ahd_linux_set_width() argument
2369 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_width()
2374 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_width()
2375 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_width()
2381 static void ahd_linux_set_period(struct scsi_target *starget, int period) in ahd_linux_set_period() argument
2383 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_period()
2388 starget->channel + 'A', in ahd_linux_set_period()
2389 shost->this_id, starget->id, &tstate); in ahd_linux_set_period()
2406 if (spi_max_width(starget)) { in ahd_linux_set_period()
2416 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_period()
2417 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_period()
2421 if (spi_width(starget) == 0) in ahd_linux_set_period()
2434 static void ahd_linux_set_offset(struct scsi_target *starget, int offset) in ahd_linux_set_offset() argument
2436 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_offset()
2441 starget->channel + 'A', in ahd_linux_set_offset()
2442 shost->this_id, starget->id, &tstate); in ahd_linux_set_offset()
2454 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_offset()
2455 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_offset()
2469 static void ahd_linux_set_dt(struct scsi_target *starget, int dt) in ahd_linux_set_dt() argument
2471 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_dt()
2476 starget->channel + 'A', in ahd_linux_set_dt()
2477 shost->this_id, starget->id, &tstate); in ahd_linux_set_dt()
2490 if (dt && spi_max_width(starget)) { in ahd_linux_set_dt()
2493 ahd_linux_set_width(starget, 1); in ahd_linux_set_dt()
2500 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_dt()
2501 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_dt()
2511 static void ahd_linux_set_qas(struct scsi_target *starget, int qas) in ahd_linux_set_qas() argument
2513 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_qas()
2518 starget->channel + 'A', in ahd_linux_set_qas()
2519 shost->this_id, starget->id, &tstate); in ahd_linux_set_qas()
2539 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_qas()
2540 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_qas()
2550 static void ahd_linux_set_iu(struct scsi_target *starget, int iu) in ahd_linux_set_iu() argument
2552 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_iu()
2557 starget->channel + 'A', in ahd_linux_set_iu()
2558 shost->this_id, starget->id, &tstate); in ahd_linux_set_iu()
2572 if (iu && spi_max_width(starget)) { in ahd_linux_set_iu()
2579 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_iu()
2580 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_iu()
2590 static void ahd_linux_set_rd_strm(struct scsi_target *starget, int rdstrm) in ahd_linux_set_rd_strm() argument
2592 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_rd_strm()
2597 starget->channel + 'A', in ahd_linux_set_rd_strm()
2598 shost->this_id, starget->id, &tstate); in ahd_linux_set_rd_strm()
2612 if (rdstrm && spi_max_width(starget)) in ahd_linux_set_rd_strm()
2615 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_rd_strm()
2616 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_rd_strm()
2626 static void ahd_linux_set_wr_flow(struct scsi_target *starget, int wrflow) in ahd_linux_set_wr_flow() argument
2628 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_wr_flow()
2633 starget->channel + 'A', in ahd_linux_set_wr_flow()
2634 shost->this_id, starget->id, &tstate); in ahd_linux_set_wr_flow()
2648 if (wrflow && spi_max_width(starget)) in ahd_linux_set_wr_flow()
2651 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_wr_flow()
2652 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_wr_flow()
2662 static void ahd_linux_set_rti(struct scsi_target *starget, int rti) in ahd_linux_set_rti() argument
2664 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_rti()
2669 starget->channel + 'A', in ahd_linux_set_rti()
2670 shost->this_id, starget->id, &tstate); in ahd_linux_set_rti()
2692 if (rti && spi_max_width(starget)) in ahd_linux_set_rti()
2695 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_rti()
2696 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_rti()
2706 static void ahd_linux_set_pcomp_en(struct scsi_target *starget, int pcomp) in ahd_linux_set_pcomp_en() argument
2708 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_pcomp_en()
2713 starget->channel + 'A', in ahd_linux_set_pcomp_en()
2714 shost->this_id, starget->id, &tstate); in ahd_linux_set_pcomp_en()
2728 if (pcomp && spi_max_width(starget)) { in ahd_linux_set_pcomp_en()
2745 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_pcomp_en()
2746 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_pcomp_en()
2756 static void ahd_linux_set_hold_mcs(struct scsi_target *starget, int hold) in ahd_linux_set_hold_mcs() argument
2758 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahd_linux_set_hold_mcs()
2763 starget->channel + 'A', in ahd_linux_set_hold_mcs()
2764 shost->this_id, starget->id, &tstate); in ahd_linux_set_hold_mcs()
2772 if (hold && spi_max_width(starget)) in ahd_linux_set_hold_mcs()
2775 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahd_linux_set_hold_mcs()
2776 starget->channel + 'A', ROLE_INITIATOR); in ahd_linux_set_hold_mcs()