Lines Matching refs:starget
543 ahc_linux_target_in_softc(struct scsi_target *starget)
546 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata);
549 target_offset = starget->id;
550 if (starget->channel != 0)
553 return &ahc->platform_data->starget[target_offset];
557 ahc_linux_target_alloc(struct scsi_target *starget)
560 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata);
563 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget);
566 char channel = starget->channel + 'A';
570 target_offset = starget->id;
571 if (starget->channel != 0)
574 if (starget->channel)
581 *ahc_targp = starget;
607 spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0;
609 spi_max_offset(starget) = 0;
610 spi_min_period(starget) =
613 ahc_compile_devinfo(&devinfo, our_id, starget->id,
626 ahc_linux_target_destroy(struct scsi_target *starget)
628 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget);
638 struct scsi_target *starget = sdev->sdev_target;
660 spi_period(starget) = 0;
1212 struct scsi_target *starget;
1218 starget = ahc->platform_data->starget[i];
1219 if (starget != NULL) {
1220 ahc->platform_data->starget[i] = NULL;
1593 struct scsi_target *starget;
1624 starget = ahc->platform_data->starget[target_offset];
1625 if (starget == NULL)
1629 (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
1630 + (spi_qas(starget) ? MSG_EXT_PPR_QAS_REQ : 0)
1631 + (spi_iu(starget) ? MSG_EXT_PPR_IU_REQ : 0);
1633 if (tinfo->curr.period == spi_period(starget)
1634 && tinfo->curr.width == spi_width(starget)
1635 && tinfo->curr.offset == spi_offset(starget)
1640 spi_period(starget) = tinfo->curr.period;
1641 spi_width(starget) = tinfo->curr.width;
1642 spi_offset(starget) = tinfo->curr.offset;
1643 spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0;
1644 spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0;
1645 spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0;
1646 spi_display_xfer_agreement(starget);
2311 static void ahc_linux_set_width(struct scsi_target *starget, int width)
2313 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2318 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2319 starget->channel + 'A', ROLE_INITIATOR);
2325 static void ahc_linux_set_period(struct scsi_target *starget, int period)
2327 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2332 starget->channel + 'A',
2333 shost->this_id, starget->id, &tstate);
2346 if (spi_max_width(starget))
2353 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2354 starget->channel + 'A', ROLE_INITIATOR);
2358 if (spi_width(starget) == 0)
2370 static void ahc_linux_set_offset(struct scsi_target *starget, int offset)
2372 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2377 starget->channel + 'A',
2378 shost->this_id, starget->id, &tstate);
2385 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2386 starget->channel + 'A', ROLE_INITIATOR);
2399 static void ahc_linux_set_dt(struct scsi_target *starget, int dt)
2401 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2406 starget->channel + 'A',
2407 shost->this_id, starget->id, &tstate);
2416 if (dt && spi_max_width(starget)) {
2419 ahc_linux_set_width(starget, 1);
2423 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2424 starget->channel + 'A', ROLE_INITIATOR);
2438 static void ahc_linux_set_qas(struct scsi_target *starget, int qas)
2440 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2445 starget->channel + 'A',
2446 shost->this_id, starget->id, &tstate);
2457 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2458 starget->channel + 'A', ROLE_INITIATOR);
2467 static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
2469 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2474 starget->channel + 'A',
2475 shost->this_id, starget->id, &tstate);
2486 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2487 starget->channel + 'A', ROLE_INITIATOR);