Lines Matching refs:starget

544 ahc_linux_target_in_softc(struct scsi_target *starget)
547 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata);
550 target_offset = starget->id;
551 if (starget->channel != 0)
554 return &ahc->platform_data->starget[target_offset];
558 ahc_linux_target_alloc(struct scsi_target *starget)
561 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata);
564 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget);
567 char channel = starget->channel + 'A';
571 target_offset = starget->id;
572 if (starget->channel != 0)
575 if (starget->channel)
582 *ahc_targp = starget;
608 spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0;
610 spi_max_offset(starget) = 0;
611 spi_min_period(starget) =
614 ahc_compile_devinfo(&devinfo, our_id, starget->id,
627 ahc_linux_target_destroy(struct scsi_target *starget)
629 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget);
639 struct scsi_target *starget = sdev->sdev_target;
661 spi_period(starget) = 0;
1213 struct scsi_target *starget;
1219 starget = ahc->platform_data->starget[i];
1220 if (starget != NULL) {
1221 ahc->platform_data->starget[i] = NULL;
1594 struct scsi_target *starget;
1625 starget = ahc->platform_data->starget[target_offset];
1626 if (starget == NULL)
1630 (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
1631 + (spi_qas(starget) ? MSG_EXT_PPR_QAS_REQ : 0)
1632 + (spi_iu(starget) ? MSG_EXT_PPR_IU_REQ : 0);
1634 if (tinfo->curr.period == spi_period(starget)
1635 && tinfo->curr.width == spi_width(starget)
1636 && tinfo->curr.offset == spi_offset(starget)
1641 spi_period(starget) = tinfo->curr.period;
1642 spi_width(starget) = tinfo->curr.width;
1643 spi_offset(starget) = tinfo->curr.offset;
1644 spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0;
1645 spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0;
1646 spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0;
1647 spi_display_xfer_agreement(starget);
2313 static void ahc_linux_set_width(struct scsi_target *starget, int width)
2315 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2320 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2321 starget->channel + 'A', ROLE_INITIATOR);
2327 static void ahc_linux_set_period(struct scsi_target *starget, int period)
2329 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2334 starget->channel + 'A',
2335 shost->this_id, starget->id, &tstate);
2348 if (spi_max_width(starget))
2355 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2356 starget->channel + 'A', ROLE_INITIATOR);
2360 if (spi_width(starget) == 0)
2371 static void ahc_linux_set_offset(struct scsi_target *starget, int offset)
2373 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2378 starget->channel + 'A',
2379 shost->this_id, starget->id, &tstate);
2386 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2387 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);
2437 static void ahc_linux_set_qas(struct scsi_target *starget, int qas)
2439 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2444 starget->channel + 'A',
2445 shost->this_id, starget->id, &tstate);
2456 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2457 starget->channel + 'A', ROLE_INITIATOR);
2465 static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
2467 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2472 starget->channel + 'A',
2473 shost->this_id, starget->id, &tstate);
2484 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2485 starget->channel + 'A', ROLE_INITIATOR);