Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Nov 2015 21:46:22 +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: r291522 - stable/10/sys/dev/isp
Message-ID:  <201511302146.tAULkMOU074031@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Nov 30 21:46:21 2015
New Revision: 291522
URL: https://svnweb.freebsd.org/changeset/base/291522

Log:
  MFC r291162: Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.
  
  This makes port scanner fix absent port ID for added initiator.

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

Modified: stable/10/sys/dev/isp/isp_freebsd.c
==============================================================================
--- stable/10/sys/dev/isp/isp_freebsd.c	Mon Nov 30 21:45:24 2015	(r291521)
+++ stable/10/sys/dev/isp/isp_freebsd.c	Mon Nov 30 21:46:21 2015	(r291522)
@@ -2354,6 +2354,7 @@ isp_handle_platform_atio(ispsoftc_t *isp
 static void
 isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t *aep)
 {
+	fcparam *fcp;
 	lun_id_t lun;
 	fcportdb_t *lp;
 	tstate_t *tptr;
@@ -2374,6 +2375,7 @@ isp_handle_platform_atio2(ispsoftc_t *is
 		return;
 	}
 
+	fcp = FCPARAM(isp, 0);
 	if (ISP_CAP_SCCFW(isp)) {
 		lun = aep->at_scclun;
 #if __FreeBSD_version < 1000700
@@ -2444,7 +2446,7 @@ isp_handle_platform_atio2(ispsoftc_t *is
 	SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle);
 	tptr->atio_count--;
 	isp_prt(isp, ISP_LOGTDEBUG2, "Take FREE ATIO count now %d", tptr->atio_count);
-	atiop->ccb_h.target_id = FCPARAM(isp, 0)->isp_loopid;
+	atiop->ccb_h.target_id = fcp->isp_loopid;
 	atiop->ccb_h.target_lun = lun;
 
 	/*
@@ -2467,6 +2469,10 @@ isp_handle_platform_atio2(ispsoftc_t *is
 				(((uint64_t) aep->at_wwpn[3]) <<  0);
 			isp_add_wwn_entry(isp, 0, wwpn, INI_NONE,
 			    nphdl, PORT_ANY, 0);
+			if (fcp->isp_loopstate > LOOP_LTEST_DONE)
+				fcp->isp_loopstate = LOOP_LTEST_DONE;
+			isp_async(isp, ISPASYNC_CHANGE_NOTIFY, 0,
+			    ISPASYNC_CHANGE_PDB, nphdl, 0x06, 0xff);
 			isp_find_pdb_by_handle(isp, 0, nphdl, &lp);
 		}
 		atiop->init_id = FC_PORTDB_TGT(isp, 0, lp);



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