diff options
author | mav <mav@FreeBSD.org> | 2014-12-03 07:05:17 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-12-03 07:05:17 +0000 |
commit | 2c60f5a12d84d0e92a1f5770c74a53e95d7bc0ac (patch) | |
tree | fa1757d68c13b88197a9de8221831c34f67381d4 /sys/dev/isp | |
parent | 1986eab03e92c4db3a99f6d1b34d37bfd90a84a1 (diff) | |
download | FreeBSD-src-2c60f5a12d84d0e92a1f5770c74a53e95d7bc0ac.zip FreeBSD-src-2c60f5a12d84d0e92a1f5770c74a53e95d7bc0ac.tar.gz |
MFC r275124: Fix WWNN/WWPN generation for virtual channels.
Diffstat (limited to 'sys/dev/isp')
-rw-r--r-- | sys/dev/isp/isp_freebsd.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index b0cbdb5..5023292 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -6109,10 +6109,9 @@ isp_default_wwn(ispsoftc_t * isp, int chan, int isactive, int iswwnn) return (seed); } return (0x400000007F000009ull); - } else { - seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; } + seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; /* * For channel zero just return what we have. For either ACTIVE or @@ -6135,11 +6134,9 @@ isp_default_wwn(ispsoftc_t * isp, int chan, int isactive, int iswwnn) if (seed) { return (seed); } - if (isactive) { + seed = iswwnn ? ISP_FC_PC(isp, 0)->def_wwnn : ISP_FC_PC(isp, 0)->def_wwpn; + if (seed == 0) seed = iswwnn ? FCPARAM(isp, 0)->isp_wwnn_nvram : FCPARAM(isp, 0)->isp_wwpn_nvram; - } else { - seed = iswwnn ? ISP_FC_PC(isp, 0)->def_wwnn : ISP_FC_PC(isp, 0)->def_wwpn; - } if (((seed >> 60) & 0xf) == 2) { /* |