• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/firewire/

Lines Matching refs:lstate

106 	struct sbp_targ_lstate *lstate;
141 struct sbp_targ_lstate *lstate[MAX_LUN];
281 STAILQ_REMOVE(&login->lstate->logins, login, sbp_targ_login, link);
282 login->lstate->sc->logins[login->id] = NULL;
311 struct sbp_targ_lstate *lstate;
340 lstate = sc->lstate[i];
341 if (lstate == NULL)
346 crom_add_simple_text(src, unit, &lstate->model, "TargetMode");
377 struct sbp_targ_lstate **lstate, int notfound_failure)
384 *lstate = sc->black_hole;
394 *lstate = sc->lstate[lun];
396 if (notfound_failure != 0 && *lstate == NULL) {
398 printf("%s: lstate for lun is invalid, target(%d), lun(%d)\n",
403 printf("%s: setting lstate for tgt(%d) lun(%d)\n",
413 struct sbp_targ_lstate *lstate;
416 status = sbp_targ_find_devs(sc, ccb, &lstate, 0);
423 if (lstate != NULL) {
434 lstate = (struct sbp_targ_lstate *)
435 malloc(sizeof(*lstate), M_SBP_TARG, M_NOWAIT | M_ZERO);
436 if (lstate == NULL) {
438 printf("Couldn't allocate lstate\n");
443 printf("%s: malloc'd lstate %p\n",__func__, lstate);
446 sc->black_hole = lstate;
451 sc->lstate[ccb->ccb_h.target_lun] = lstate;
453 memset(lstate, 0, sizeof(*lstate));
454 lstate->sc = sc;
455 status = xpt_create_path(&lstate->path, /*periph*/NULL,
460 free(lstate, M_SBP_TARG);
461 lstate = NULL;
467 SLIST_INIT(&lstate->accept_tios);
468 SLIST_INIT(&lstate->immed_notifies);
469 STAILQ_INIT(&lstate->logins);
479 if (lstate == NULL) {
481 printf("Invalid lstate for this target\n");
486 if (SLIST_FIRST(&lstate->accept_tios) != NULL) {
491 if (SLIST_FIRST(&lstate->immed_notifies) != NULL) {
503 xpt_free_path(lstate->path);
505 for (login = STAILQ_FIRST(&lstate->logins); login != NULL;
514 sc->lstate[ccb->ccb_h.target_lun] = NULL;
516 printf("%s: free lstate %p\n", __func__, lstate);
517 free(lstate, M_SBP_TARG);
518 lstate = NULL;
527 struct sbp_targ_lstate *lstate)
566 sbp_targ_get_orb_info(struct sbp_targ_lstate *lstate,
572 login = lstate->sc->logins[init_id];
888 struct sbp_targ_lstate *lstate;
894 status = sbp_targ_find_devs(sc, ccb, &lstate, 0);
901 list = &lstate->accept_tios;
903 list = &lstate->immed_notifies;
1176 struct sbp_targ_lstate *lstate;
1182 status = sbp_targ_find_devs(sc, ccb, &lstate, TRUE);
1199 orbi = sbp_targ_get_orb_info(lstate,
1276 SLIST_INSERT_HEAD(&lstate->accept_tios, &ccb->ccb_h,
1279 if ((lstate->flags & F_ATIO_STARVED) != 0) {
1284 lstate->flags &= ~F_ATIO_STARVED;
1285 STAILQ_FOREACH(login, &lstate->logins, link)
1288 sbp_targ_fetch_orb(lstate->sc,
1302 SLIST_INSERT_HEAD(&lstate->immed_notifies, &ccb->ccb_h,
1305 sbp_targ_send_lstate_events(sc, lstate);
1470 atio->ccb_h.target_lun = orbi->login->lstate->lun;
1534 struct sbp_targ_lstate *lstate;
1538 lstate = sc->lstate[lun];
1540 STAILQ_FOREACH(login, &lstate->logins, link)
1562 login->lstate = lstate;
1575 struct sbp_targ_lstate *lstate;
1619 lstate = orbi->sc->lstate[lun];
1621 if (lun >= MAX_LUN || lstate == NULL ||
1623 STAILQ_FIRST(&lstate->logins) != NULL &&
1624 STAILQ_FIRST(&lstate->logins)->fwdev != orbi->fwdev)
1653 STAILQ_INSERT_TAIL(&lstate->logins, login, link);
1711 sbp_targ_fetch_orb(orbi->login->lstate->sc, orbi->fwdev,
1756 SLIST_FIRST(&login->lstate->accept_tios);
1760 login->lstate->flags |= F_ATIO_STARVED;
1768 SLIST_REMOVE_HEAD(&login->lstate->accept_tios, sim_links.sle);
2007 struct sbp_targ_lstate *lstate;
2020 lstate = sc->lstate[i];
2021 if (lstate != NULL) {
2022 xpt_free_path(lstate->path);
2023 free(lstate, M_SBP_TARG);