Lines Matching +defs:error +defs:target

170 	aprint_normal(": %d target%s, %d lun%s per target\n",
285 int error;
296 error = scsipi_target_detach(chan, -1, -1, flags);
297 if (error)
298 return error;
333 scsi_report_luns(struct scsibus_softc *sc, int target,
345 int error;
354 periph->periph_target = target;
358 if ((error = scsipi_inquire(periph, &inqbuf,
363 error = ENOTSUP;
376 error = scsipi_command(periph, (void *)&replun, sizeof(replun),
379 if (error)
389 error = EIO;
425 return error;
429 scsi_discover_luns(struct scsibus_softc *sc, int target, int minlun, int maxlun)
434 if (scsi_report_luns(sc, target, &luns, &nluns) == 0) {
437 scsi_probe_device(sc, target, luns[i]);
446 if (scsi_probe_device(sc, target, lun) == 0)
454 * target and lun optionally narrow the search if not -1
457 scsi_probe_bus(struct scsibus_softc *sc, int target, int lun)
461 int error;
463 if (target == -1) {
467 if (target < 0 || target >= chan->chan_ntargets)
469 maxtarget = mintarget = target;
487 if ((error = scsipi_adapter_addref(chan->chan_adapter)) != 0)
489 for (target = mintarget; target <= maxtarget; target++) {
490 if (target == chan->chan_id)
493 scsi_discover_luns(sc, target, minlun, maxlun);
500 scsipi_set_xfer_mode(chan, target, 1);
505 return (error);
525 int target, lun;
527 target = device_locator(child, SCSIBUSCF_TARGET);
532 periph = scsipi_lookup_periph_locked(chan, target, lun);
559 int target, lun;
566 target = sa->sa_periph->periph_target;
579 aprint_normal(" target %d lun %d: <%s, %s, %s> %s %s%s",
580 target, lun, vendor, product, revision, dtype,
873 * given a target and lun, ask the device what
878 scsi_probe_device(struct scsibus_softc *sc, int target, int lun)
898 if (scsipi_lookup_periph(chan, target, lun) != NULL)
905 periph->periph_target = target;
911 SCSIPI_DEBUG_TARGET == target &&
1091 locs[SCSIBUSCF_TARGET] = target;
1139 int error, unit = minor(dev);
1148 if ((error = scsipi_adapter_addref(sc->sc_channel->chan_adapter)) != 0)
1149 return (error);
1175 int error;
1199 error = scsi_probe_bus(sc, a->sa_target, a->sa_lun);
1208 error = scsipi_target_detach(chan, a->sa_target, a->sa_lun, 0);
1216 error = scsipi_adapter_ioctl(chan, cmd, addr, flag, l->l_proc);
1220 return (error);