Lines Matching defs:lp

2487 	fcportdb_t *lp;
2491 lp = &fcp->portdb[i];
2492 switch (lp->state) {
2496 lp->state = FC_PORTDB_STATE_NIL;
2497 isp_async(isp, ISPASYNC_DEV_GONE, chan, lp);
2501 lp->state = FC_PORTDB_STATE_NIL;
2506 panic("Don't know how to clear state %d\n", lp->state);
2515 fcportdb_t *lp;
2519 lp = &fcp->portdb[i];
2520 if (lp->state == FC_PORTDB_STATE_NIL)
2522 if (lp->portid >= DOMAIN_CONTROLLER_BASE &&
2523 lp->portid <= DOMAIN_CONTROLLER_END)
3142 fcportdb_t *lp;
3155 lp = &fcp->portdb[dbidx];
3157 if (lp->state == FC_PORTDB_STATE_NIL)
3159 if (lp->probational && lp->state != FC_PORTDB_STATE_ZOMBIE)
3160 lp->state = FC_PORTDB_STATE_DEAD;
3161 switch (lp->state) {
3163 lp->state = FC_PORTDB_STATE_NIL;
3164 isp_async(isp, ISPASYNC_DEV_GONE, chan, lp);
3165 if ((lp->portid & 0xffff00) != 0) {
3166 (void) isp_plogx(isp, chan, lp->handle,
3167 lp->portid,
3178 lp->state = FC_PORTDB_STATE_VALID;
3179 isp_async(isp, ISPASYNC_DEV_ARRIVED, chan, lp);
3182 lp->state = FC_PORTDB_STATE_VALID;
3183 isp_async(isp, ISPASYNC_DEV_CHANGED, chan, lp);
3184 lp->portid = lp->new_portid;
3185 lp->prli_word3 = lp->new_prli_word3;
3188 isp_async(isp, ISPASYNC_DEV_STAYED, chan, lp);
3195 lp->state, dbidx);
3214 fcportdb_t *lp;
3221 if (isp_find_pdb_by_wwpn(isp, chan, wwpn, &lp)) {
3222 if (!lp->probational) {
3225 chan, lp->portid, lp->handle,
3226 FC_PORTDB_TGT(isp, chan, lp), lp->state);
3230 lp->probational = 0;
3231 lp->node_wwn = wwnn;
3234 if (lp->portid == pdb->portid &&
3235 lp->handle == pdb->handle &&
3236 lp->prli_word3 == pdb->prli_word3) {
3237 if (lp->state != FC_PORTDB_STATE_NEW)
3238 lp->state = FC_PORTDB_STATE_VALID;
3246 lp->state = FC_PORTDB_STATE_CHANGED;
3247 lp->handle = pdb->handle;
3248 lp->new_portid = pdb->portid;
3249 lp->new_prli_word3 = pdb->prli_word3;
3257 if (!isp_find_pdb_empty(isp, chan, &lp)) {
3262 ISP_MEMZERO(lp, sizeof (fcportdb_t));
3263 lp->probational = 0;
3264 lp->state = FC_PORTDB_STATE_NEW;
3265 lp->portid = lp->new_portid = pdb->portid;
3266 lp->prli_word3 = lp->new_prli_word3 = pdb->prli_word3;
3267 lp->handle = pdb->handle;
3268 lp->port_wwn = wwpn;
3269 lp->node_wwn = wwnn;
3288 fcportdb_t *lp = &fcp->portdb[i];
3290 if (lp->state == FC_PORTDB_STATE_NIL ||
3291 lp->state == FC_PORTDB_STATE_ZOMBIE)
3293 if (VALID_PORT(lp->portid))
3296 r = isp_getpdb(isp, chan, lp->handle, &pdb);
3302 chan, lp->handle, r);
3307 if (lp->port_wwn != wwpn)
3309 lp->portid = lp->new_portid = pdb.portid;
3604 fcportdb_t *lp;
3756 if (isp_find_pdb_by_portid(isp, chan, portid, &lp)) {
3757 if (!lp->probational) {
3760 chan, lp->portid, lp->handle,
3761 FC_PORTDB_TGT(isp, chan, lp), lp->state);
3766 if (lp->state == FC_PORTDB_STATE_ZOMBIE)
3784 r = isp_getpdb(isp, chan, lp->handle, &pdb);
3788 lp->state = FC_PORTDB_STATE_DEAD;
3791 chan, portid, lp->handle, r);
4260 fcportdb_t *lp;
4302 lp = &fcp->portdb[target];
4304 lp->is_target == 0) {
4314 if (lp->state == FC_PORTDB_STATE_ZOMBIE) {
4320 if (lp->state != FC_PORTDB_STATE_VALID) {
4323 XS_CHANNEL(xs), target, (uintmax_t)XS_LUN(xs), lp->state);
4338 lp = NULL;
4466 t7->req_nphdl = lp->handle;
4467 t7->req_tidlo = lp->portid;
4468 t7->req_tidhi = lp->portid >> 16;
4471 if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) {
4490 if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) {
4501 t2e->req_target = lp->handle;
4506 t2->req_target = lp->handle;
4511 t2->req_target = lp->handle;
4601 fcportdb_t *lp;
4607 lp = &fcp->portdb[tgt];
4608 if (lp->is_target == 0 ||
4609 lp->state != FC_PORTDB_STATE_VALID) {
4618 tmf->tmf_nphdl = lp->handle;
4622 tmf->tmf_tidlo = lp->portid;
4623 tmf->tmf_tidhi = lp->portid >> 16;
4631 isp_prt(isp, ISP_LOGALL, "Chan %d Reset N-Port Handle 0x%04x @ Port 0x%06x", chan, lp->handle, lp->portid);
4689 fcportdb_t *lp;
4696 lp = &fcp->portdb[tgt];
4697 if (lp->is_target == 0 ||
4698 lp->state != FC_PORTDB_STATE_VALID) {
4702 isp_prt(isp, ISP_LOGALL, "Chan %d Abort Cmd for N-Port 0x%04x @ Port 0x%06x", chan, lp->handle, lp->portid);
4706 ab->abrt_handle = lp->handle;
4708 ab->abrt_tidlo = lp->portid;
4709 ab->abrt_tidhi = lp->portid >> 16;
6163 fcportdb_t *lp;
6179 lp = &fcp->portdb[XS_TGT(xs)];
6180 if (lp->state == FC_PORTDB_STATE_ZOMBIE) {
6311 fcportdb_t *lp;
6328 lp = &fcp->portdb[XS_TGT(xs)];
6329 if (lp->state == FC_PORTDB_STATE_ZOMBIE) {