Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2014 17:13:04 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r274385 - stable/10/sys/dev/isp
Message-ID:  <201411111713.sABHD49g000623@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Nov 11 17:13:03 2014
New Revision: 274385
URL: https://svnweb.freebsd.org/changeset/base/274385

Log:
  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.

Modified:
  stable/10/sys/dev/isp/isp_library.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/isp/isp_library.c
==============================================================================
--- stable/10/sys/dev/isp/isp_library.c	Tue Nov 11 16:51:00 2014	(r274384)
+++ stable/10/sys/dev/isp/isp_library.c	Tue Nov 11 17:13:03 2014	(r274385)
@@ -2540,6 +2540,10 @@ isp_add_wwn_entry(ispsoftc_t *isp, int c
 			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 c
 	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;



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