Lines Matching defs:lun

239 	/* free used and unused lun switches */
304 int offset, target, lun, tag;
342 lun = siop_cmd->cmd_c.xs->xs_periph->periph_lun;
344 siop_lun = siop_target->siop_lun[lun];
347 printf("siop_cmd (lun %d) for DSA 0x%x "
348 "not active (%d)\n", lun, (u_int)dsa,
353 lun = -1;
358 printf("siop_cmd (lun %d tag %d) not in siop_lun "
359 "active (%p != %p)\n", lun, tag, siop_cmd,
367 lun = -1;
644 lun = bus_space_read_1(sc->sc_c.sc_rt, sc->sc_c.sc_rh,
655 siop_lun = siop_target->siop_lun[lun];
658 "lun %d\n", device_xname(sc->sc_c.sc_dev),
659 target, lun);
663 printf("%s: target %d lun %d tag %d reselect "
666 target, lun, tag);
988 siop_del_dev(sc, target, lun);
1067 siop_unqueue(struct siop_softc *sc, int target, int lun)
1072 ((struct siop_target *)sc->sc_c.targets[target])->siop_lun[lun];
1122 int lun = siop_cmd->cmd_c.xs->xs_periph->periph_lun;
1125 ((struct siop_target*)sc->sc_c.targets[target])->siop_lun[lun];
1129 device_xname(sc->sc_c.sc_dev), target, lun, tag,
1136 "lun %d (status %d)\n", device_xname(sc->sc_c.sc_dev),
1137 target, lun, siop_lun->siop_tag[0].active->cmd_c.status);
1167 int target, lun, tag;
1188 for (lun = 0; lun < 8; lun++) {
1191 siop_lun = siop_target->siop_lun[lun];
1233 int lun;
1240 lun = periph->periph_lun;
1244 printf("starting cmd for %d:%d\n", target, lun);
1287 /* get a lun switch script */
1304 if (siop_target->siop_lun[lun] == NULL) {
1305 siop_target->siop_lun[lun] =
1308 if (siop_target->siop_lun[lun] == NULL) {
1311 "target %d lun %d\n",
1312 target, lun);
1421 for (lun = 0; lun < sc->sc_c.sc_chan.chan_nluns; lun++) {
1423 xm->xm_target, lun) != NULL) {
1424 /* allocate a lun sw entry for this device */
1425 siop_add_dev(sc, xm->xm_target, lun);
1441 int target, lun, slot;
1472 lun = siop_cmd->cmd_c.xs->xs_periph->periph_lun;
1474 ((struct siop_target*)sc->sc_c.targets[target])->siop_lun[lun];
1887 siop_add_dev(struct siop_softc *sc, int target, int lun)
1892 struct siop_lun *siop_lun = siop_target->siop_lun[lun];
1905 "%d:%d: can't allocate a lun sw slot\n", target, lun);
1913 * we need 8 bytes for the lun sw additional entry, and
1929 "%d:%d: not enough memory for a lun sw slot\n",
1930 target, lun);
1935 printf("%s:%d:%d: allocate lun sw entry\n",
1936 device_xname(sc->sc_c.sc_dev), target, lun);
1941 /* Now the slot entry: JUMP abs_foo, IF lun */
1943 0x800c0000 | lun);
1972 /* non-tag case; just work with the lun switch */
1974 siop_target->siop_lun[lun]->reseloff;
1980 siop_del_dev(struct siop_softc *sc, int target, int lun)
1986 printf("%s:%d:%d: free lun sw entry\n",
1987 device_xname(sc->sc_c.sc_dev), target, lun);
1992 free(siop_target->siop_lun[lun], M_DEVBUF);
1993 siop_target->siop_lun[lun] = NULL;
2001 printf("%s: free siop_target for target %d lun %d lunsw offset %d\n",
2002 device_xname(sc->sc_c.sc_dev), target, lun,