Lines Matching refs:starget

544 ahc_linux_target_in_softc(struct scsi_target *starget)  in DEF_SCSI_QCMD()
547 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata); in DEF_SCSI_QCMD()
550 target_offset = starget->id; in DEF_SCSI_QCMD()
551 if (starget->channel != 0) in DEF_SCSI_QCMD()
554 return &ahc->platform_data->starget[target_offset]; in DEF_SCSI_QCMD()
558 ahc_linux_target_alloc(struct scsi_target *starget) in ahc_linux_target_alloc() argument
561 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata); in ahc_linux_target_alloc()
564 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget); in ahc_linux_target_alloc()
569 char channel = starget->channel + 'A'; in ahc_linux_target_alloc()
573 target_offset = starget->id; in ahc_linux_target_alloc()
574 if (starget->channel != 0) in ahc_linux_target_alloc()
577 if (starget->channel) in ahc_linux_target_alloc()
584 *ahc_targp = starget; in ahc_linux_target_alloc()
610 spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0; in ahc_linux_target_alloc()
612 spi_max_offset(starget) = 0; in ahc_linux_target_alloc()
613 spi_min_period(starget) = in ahc_linux_target_alloc()
617 starget->id, &tstate); in ahc_linux_target_alloc()
619 ahc_compile_devinfo(&devinfo, our_id, starget->id, in ahc_linux_target_alloc()
632 ahc_linux_target_destroy(struct scsi_target *starget) in ahc_linux_target_destroy() argument
634 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget); in ahc_linux_target_destroy()
644 struct scsi_target *starget = sdev->sdev_target; in ahc_linux_slave_alloc() local
666 spi_period(starget) = 0; in ahc_linux_slave_alloc()
1233 struct scsi_target *starget; in ahc_platform_free() local
1239 starget = ahc->platform_data->starget[i]; in ahc_platform_free()
1240 if (starget != NULL) { in ahc_platform_free()
1241 ahc->platform_data->starget[i] = NULL; in ahc_platform_free()
1614 struct scsi_target *starget; in ahc_send_async() local
1646 starget = ahc->platform_data->starget[target_offset]; in ahc_send_async()
1647 if (starget == NULL) in ahc_send_async()
1649 targ = scsi_transport_target_data(starget); in ahc_send_async()
1652 (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0) in ahc_send_async()
1653 + (spi_qas(starget) ? MSG_EXT_PPR_QAS_REQ : 0) in ahc_send_async()
1654 + (spi_iu(starget) ? MSG_EXT_PPR_IU_REQ : 0); in ahc_send_async()
1656 if (tinfo->curr.period == spi_period(starget) in ahc_send_async()
1657 && tinfo->curr.width == spi_width(starget) in ahc_send_async()
1658 && tinfo->curr.offset == spi_offset(starget) in ahc_send_async()
1663 spi_period(starget) = tinfo->curr.period; in ahc_send_async()
1664 spi_width(starget) = tinfo->curr.width; in ahc_send_async()
1665 spi_offset(starget) = tinfo->curr.offset; in ahc_send_async()
1666 spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0; in ahc_send_async()
1667 spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0; in ahc_send_async()
1668 spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0; in ahc_send_async()
1669 spi_display_xfer_agreement(starget); in ahc_send_async()
2338 static void ahc_linux_set_width(struct scsi_target *starget, int width) in ahc_linux_set_width() argument
2340 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_width()
2345 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_width()
2346 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_width()
2352 static void ahc_linux_set_period(struct scsi_target *starget, int period) in ahc_linux_set_period() argument
2354 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_period()
2359 starget->channel + 'A', in ahc_linux_set_period()
2360 shost->this_id, starget->id, &tstate); in ahc_linux_set_period()
2373 if (spi_max_width(starget)) in ahc_linux_set_period()
2380 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_period()
2381 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_period()
2385 if (spi_width(starget) == 0) in ahc_linux_set_period()
2396 static void ahc_linux_set_offset(struct scsi_target *starget, int offset) in ahc_linux_set_offset() argument
2398 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_offset()
2403 starget->channel + 'A', in ahc_linux_set_offset()
2404 shost->this_id, starget->id, &tstate); in ahc_linux_set_offset()
2411 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_offset()
2412 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_offset()
2424 static void ahc_linux_set_dt(struct scsi_target *starget, int dt) in ahc_linux_set_dt() argument
2426 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_dt()
2431 starget->channel + 'A', in ahc_linux_set_dt()
2432 shost->this_id, starget->id, &tstate); in ahc_linux_set_dt()
2441 if (dt && spi_max_width(starget)) { in ahc_linux_set_dt()
2444 ahc_linux_set_width(starget, 1); in ahc_linux_set_dt()
2448 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_dt()
2449 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_dt()
2462 static void ahc_linux_set_qas(struct scsi_target *starget, int qas)
2464 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2469 starget->channel + 'A',
2470 shost->this_id, starget->id, &tstate);
2481 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2482 starget->channel + 'A', ROLE_INITIATOR);
2490 static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
2492 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2497 starget->channel + 'A',
2498 shost->this_id, starget->id, &tstate);
2509 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2510 starget->channel + 'A', ROLE_INITIATOR);