Lines Matching defs:target
288 if (cf->cf_loc[0] != -1 && cf->cf_loc[0] != link->target)
342 scsi_activate(struct scsibus_softc *sb, int target, int lun, int act)
344 if (target == -1 && lun == -1)
347 return scsi_activate_target(sb, target, act);
349 return scsi_activate_lun(sb, target, lun, act);
368 scsi_activate_target(struct scsibus_softc *sb, int target, int act)
373 /* Activate all links on the target. */
375 if (link->target == target) {
385 scsi_activate_lun(struct scsibus_softc *sb, int target, int lun, int act)
389 /* Activate the (target, lun) link.*/
390 link = scsi_get_link(sb, target, lun);
417 scsi_probe(struct scsibus_softc *sb, int target, int lun)
419 if (target == -1 && lun == -1)
422 return scsi_probe_target(sb, target);
424 return scsi_probe_lun(sb, target, lun);
430 int target, r, rv = 0;
433 for (target = 0; target < sb->sb_adapter_buswidth; target++) {
434 r = scsi_probe_target(sb, target);
442 scsi_probe_target(struct scsibus_softc *sb, int target)
447 if (target < 0 || target == sb->sb_adapter_target)
450 scsi_get_target_luns(sb, target, &lunarray);
455 r = scsi_probe_link(sb, target, lunarray.luns[i],
466 scsi_probe_lun(struct scsibus_softc *sb, int target, int lun)
468 if (target < 0 || target == sb->sb_adapter_target || lun < 0)
471 /* Probe lun on target. *NOT* a dumbscan! */
472 return scsi_probe_link(sb, target, lun, 0);
476 scsi_probe_link(struct scsibus_softc *sb, int target, int lun, int dumbscan)
487 if (scsi_get_link(sb, target, lun) != NULL)
497 link->target = target;
558 ((target < 32) && ((1U << target) & scsidebug_targets)) &&
615 link0 = scsi_get_link(sb, target, 0);
694 scsi_get_link(sb, target, 1) == NULL && sb->sb_luns > 1 &&
728 scsi_detach(struct scsibus_softc *sb, int target, int lun, int flags)
730 if (target == -1 && lun == -1)
733 return scsi_detach_target(sb, target, flags);
735 return scsi_detach_lun(sb, target, lun, flags);
754 scsi_detach_target(struct scsibus_softc *sb, int target, int flags)
759 /* Detach all links from target. */
761 if (link->target == target) {
771 scsi_detach_lun(struct scsibus_softc *sb, int target, int lun, int flags)
775 /* Detach (target, lun) link. */
776 link = scsi_get_link(sb, target, lun);
825 scsi_get_link(struct scsibus_softc *sb, int target, int lun)
830 if (link->target == target && link->lun == lun)
862 scsi_get_target_luns(struct scsibus_softc *sb, int target,
870 scsi_probe_link(sb, target, 0, 0);
871 link0 = scsi_get_link(sb, target, 0);
986 printf(" targ %d lun %d: ", link->target, link->lun);