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