Lines Matching refs:lun
71 struct ctl_lun *lun;
73 lun = (struct ctl_lun *)lunptr;
91 if ((lun != NULL) && (lun->MODE_CTRL.rlec & SCP_DSENSE))
101 if ((lun != NULL) && (lun->MODE_CTRLE.max_sense != 0))
102 *sense_len = lun->MODE_CTRLE.max_sense;
129 struct ctl_lun *lun;
137 lun = CTL_LUN(ctsio);
142 lun,
196 /*lun*/ NULL,
343 /*lun*/ NULL,
390 ctl_ua_to_ascq(struct ctl_lun *lun, ctl_ua_type ua_to_build, int *asc,
477 *info = lun->ua_tpt_info;
486 *asc = lun->ie_asc;
487 *ascq = lun->ie_ascq;
495 ctl_build_qae(struct ctl_lun *lun, uint32_t initidx, uint8_t *resp)
503 mtx_assert(&lun->lun_lock, MA_OWNED);
506 if (lun->pending_ua[p] == NULL)
509 ua = lun->pending_ua[p][i];
516 ctl_ua_to_ascq(lun, ua_to_build, &asc, &ascq, &ua_to_clear, &info);
529 ctl_build_ua(struct ctl_lun *lun, uint32_t initidx,
539 mtx_assert(&lun->lun_lock, MA_OWNED);
540 mtx_assert(&lun->ctl_softc->ctl_lock, MA_NOTOWNED);
542 if ((ua = lun->pending_ua[p]) == NULL) {
543 mtx_unlock(&lun->lun_lock);
546 mtx_lock(&lun->lun_lock);
547 if (lun->pending_ua[p] == NULL) {
548 lun->pending_ua[p] = ua;
553 ua = lun->pending_ua[p];
563 ctl_ua_to_ascq(lun, ua_to_build, &asc, &ascq, &ua_to_clear, &info);
565 ctl_set_sense_data(sense, sense_len, lun, sense_format, 1,
574 mtx_unlock(&lun->lun_lock);
575 mtx_lock(&lun->ctl_softc->ctl_lock);
576 ctl_clr_ua_allluns(lun->ctl_softc, initidx, ua_to_build);
577 mtx_unlock(&lun->ctl_softc->ctl_lock);
578 mtx_lock(&lun->lun_lock);
580 (lun->MODE_LBP.main.flags & SLBPP_SITUA) != 0) {
581 ctl_clr_ua_all(lun, -1, ua_to_build);