Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Nov 2014 16:05:02 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r275124 - head/sys/dev/isp
Message-ID:  <201411261605.sAQG52TR026312@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Nov 26 16:05:01 2014
New Revision: 275124
URL: https://svnweb.freebsd.org/changeset/base/275124

Log:
  Fix WWNN/WWPN generation for virtual channels.
  
  MFC after:	1 week

Modified:
  head/sys/dev/isp/isp_freebsd.c

Modified: head/sys/dev/isp/isp_freebsd.c
==============================================================================
--- head/sys/dev/isp/isp_freebsd.c	Wed Nov 26 15:03:21 2014	(r275123)
+++ head/sys/dev/isp/isp_freebsd.c	Wed Nov 26 16:05:01 2014	(r275124)
@@ -6138,10 +6138,9 @@ isp_default_wwn(ispsoftc_t * isp, int ch
 			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
@@ -6164,11 +6163,9 @@ isp_default_wwn(ispsoftc_t * isp, int ch
 	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) {
 		/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411261605.sAQG52TR026312>