diff options
author | mav <mav@FreeBSD.org> | 2014-11-11 17:13:03 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-11-11 17:13:03 +0000 |
commit | e4a81f9ddf59ce28d3a6ff490d99f10f7abbd816 (patch) | |
tree | 0dbd7662091fe083584008e63f0b6b8b3b881dd6 /sys/dev/isp | |
parent | c7b266cfad2b27bd6e90b907c611e1a0b5460e2b (diff) | |
download | FreeBSD-src-e4a81f9ddf59ce28d3a6ff490d99f10f7abbd816.zip FreeBSD-src-e4a81f9ddf59ce28d3a6ff490d99f10f7abbd816.tar.gz |
MFC r272936:
Update isp_tgt_map and send new arrival notification if target that departed
earlier has returned. Previously that code worked only once, confusing CTL.
Diffstat (limited to 'sys/dev/isp')
-rw-r--r-- | sys/dev/isp/isp_library.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/isp/isp_library.c b/sys/dev/isp/isp_library.c index 9d7cfe2..0dd72a5 100644 --- a/sys/dev/isp/isp_library.c +++ b/sys/dev/isp/isp_library.c @@ -2540,6 +2540,10 @@ isp_add_wwn_entry(ispsoftc_t *isp, int chan, uint64_t ini, uint16_t nphdl, uint3 isp_prt(isp, ISP_LOGWARN, "Chan %d IID 0x%016llx N-Port Handle 0x%04x Port ID 0x%06x reentered", chan, (unsigned long long) lp->port_wwn, lp->handle, lp->portid); } + if (fcp->isp_tgt_map[nphdl] == 0) { + fcp->isp_tgt_map[nphdl] = i + 1; + goto notify; + } return; } @@ -2573,6 +2577,7 @@ isp_add_wwn_entry(ispsoftc_t *isp, int chan, uint64_t ini, uint16_t nphdl, uint3 isp_prt(isp, ISP_LOGTINFO, "Chan %d IID 0x%016llx N-Port Handle 0x%04x Port ID 0x%06x vtgt %d %s added", chan, (unsigned long long) ini, nphdl, s_id, fcp->isp_tgt_map[nphdl] - 1, buf); +notify: ISP_MEMZERO(&nt, sizeof (nt)); nt.nt_hba = isp; nt.nt_wwn = ini; |