From owner-svn-src-all@freebsd.org Sun Nov 22 16:55:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53C20A3574B; Sun, 22 Nov 2015 16:55:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19EDD1C8C; Sun, 22 Nov 2015 16:55:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAMGtiBD091766; Sun, 22 Nov 2015 16:55:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAMGtis5091765; Sun, 22 Nov 2015 16:55:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511221655.tAMGtis5091765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 22 Nov 2015 16:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291162 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 16:55:45 -0000 Author: mav Date: Sun Nov 22 16:55:43 2015 New Revision: 291162 URL: https://svnweb.freebsd.org/changeset/base/291162 Log: Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx. This makes port scanner fix absent port ID for added initiator. Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Nov 22 15:57:54 2015 (r291161) +++ head/sys/dev/isp/isp_freebsd.c Sun Nov 22 16:55:43 2015 (r291162) @@ -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);