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()
567 char channel = starget->channel + 'A'; in ahc_linux_target_alloc()
571 target_offset = starget->id; in ahc_linux_target_alloc()
572 if (starget->channel != 0) in ahc_linux_target_alloc()
575 if (starget->channel) in ahc_linux_target_alloc()
582 *ahc_targp = starget; in ahc_linux_target_alloc()
608 spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0; in ahc_linux_target_alloc()
610 spi_max_offset(starget) = 0; in ahc_linux_target_alloc()
611 spi_min_period(starget) = in ahc_linux_target_alloc()
614 ahc_compile_devinfo(&devinfo, our_id, starget->id, in ahc_linux_target_alloc()
627 ahc_linux_target_destroy(struct scsi_target *starget) in ahc_linux_target_destroy() argument
629 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget); in ahc_linux_target_destroy()
639 struct scsi_target *starget = sdev->sdev_target; in ahc_linux_slave_alloc() local
661 spi_period(starget) = 0; in ahc_linux_slave_alloc()
1220 struct scsi_target *starget; in ahc_platform_free() local
1226 starget = ahc->platform_data->starget[i]; in ahc_platform_free()
1227 if (starget != NULL) { in ahc_platform_free()
1228 ahc->platform_data->starget[i] = NULL; in ahc_platform_free()
1601 struct scsi_target *starget; in ahc_send_async() local
1632 starget = ahc->platform_data->starget[target_offset]; in ahc_send_async()
1633 if (starget == NULL) in ahc_send_async()
1637 (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0) in ahc_send_async()
1638 + (spi_qas(starget) ? MSG_EXT_PPR_QAS_REQ : 0) in ahc_send_async()
1639 + (spi_iu(starget) ? MSG_EXT_PPR_IU_REQ : 0); in ahc_send_async()
1641 if (tinfo->curr.period == spi_period(starget) in ahc_send_async()
1642 && tinfo->curr.width == spi_width(starget) in ahc_send_async()
1643 && tinfo->curr.offset == spi_offset(starget) in ahc_send_async()
1648 spi_period(starget) = tinfo->curr.period; in ahc_send_async()
1649 spi_width(starget) = tinfo->curr.width; in ahc_send_async()
1650 spi_offset(starget) = tinfo->curr.offset; in ahc_send_async()
1651 spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0; in ahc_send_async()
1652 spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0; in ahc_send_async()
1653 spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0; in ahc_send_async()
1654 spi_display_xfer_agreement(starget); in ahc_send_async()
2324 static void ahc_linux_set_width(struct scsi_target *starget, int width) in ahc_linux_set_width() argument
2326 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_width()
2331 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_width()
2332 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_width()
2338 static void ahc_linux_set_period(struct scsi_target *starget, int period) in ahc_linux_set_period() argument
2340 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_period()
2345 starget->channel + 'A', in ahc_linux_set_period()
2346 shost->this_id, starget->id, &tstate); in ahc_linux_set_period()
2359 if (spi_max_width(starget)) in ahc_linux_set_period()
2366 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_period()
2367 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_period()
2371 if (spi_width(starget) == 0) in ahc_linux_set_period()
2383 static void ahc_linux_set_offset(struct scsi_target *starget, int offset) in ahc_linux_set_offset() argument
2385 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_offset()
2390 starget->channel + 'A', in ahc_linux_set_offset()
2391 shost->this_id, starget->id, &tstate); in ahc_linux_set_offset()
2398 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_offset()
2399 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_offset()
2412 static void ahc_linux_set_dt(struct scsi_target *starget, int dt) in ahc_linux_set_dt() argument
2414 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_dt()
2419 starget->channel + 'A', in ahc_linux_set_dt()
2420 shost->this_id, starget->id, &tstate); in ahc_linux_set_dt()
2429 if (dt && spi_max_width(starget)) { in ahc_linux_set_dt()
2432 ahc_linux_set_width(starget, 1); in ahc_linux_set_dt()
2436 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_dt()
2437 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_dt()
2451 static void ahc_linux_set_qas(struct scsi_target *starget, int qas)
2453 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2458 starget->channel + 'A',
2459 shost->this_id, starget->id, &tstate);
2470 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2471 starget->channel + 'A', ROLE_INITIATOR);
2480 static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
2482 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2487 starget->channel + 'A',
2488 shost->this_id, starget->id, &tstate);
2499 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2500 starget->channel + 'A', ROLE_INITIATOR);