From owner-svn-src-all@freebsd.org Tue Aug 1 12:58:49 2017 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 EA19ADAB9E0; Tue, 1 Aug 2017 12:58:49 +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 A945E76177; Tue, 1 Aug 2017 12:58:49 +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 v71Cwmhv031228; Tue, 1 Aug 2017 12:58:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71CwmJF031227; Tue, 1 Aug 2017 12:58:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201708011258.v71CwmJF031227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 1 Aug 2017 12:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321867 - stable/11/sys/dev/isp X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/isp X-SVN-Commit-Revision: 321867 X-SVN-Commit-Repository: base 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.23 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: Tue, 01 Aug 2017 12:58:50 -0000 Author: mav Date: Tue Aug 1 12:58:48 2017 New Revision: 321867 URL: https://svnweb.freebsd.org/changeset/base/321867 Log: MFC r320492: Polish target_id/target_lun setting for ATIOs/INOTs. For ATIOs it is pointless to report isp_loopid to CAM, since in other places it operates with port database record IDs, not with loop IDs. For INOTs target_id/target_lun seems were never set, so wildcard INOTs probably were not working correctly when LUN IDs were important. Modified: stable/11/sys/dev/isp/isp_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/11/sys/dev/isp/isp_freebsd.c Tue Aug 1 11:51:35 2017 (r321866) +++ stable/11/sys/dev/isp/isp_freebsd.c Tue Aug 1 12:58:48 2017 (r321867) @@ -1608,7 +1608,7 @@ isp_target_putback_atio(union ccb *ccb) } at->at_status = CT_OK; at->at_rxid = cso->tag_id; - at->at_iid = cso->ccb_h.target_id; + at->at_iid = cso->init_id; if (isp_target_put_entry(isp, at)) { callout_reset(&PISP_PCMD(ccb)->wdog, 10, isp_refire_putback_atio, ccb); @@ -1693,7 +1693,7 @@ isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t atp->state = ATPD_STATE_ATIO; SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO\n"); - atiop->ccb_h.target_id = fcp->isp_loopid; + atiop->ccb_h.target_id = ISP_MAX_TARGETS(isp); atiop->ccb_h.target_lun = lun; /* @@ -1872,7 +1872,7 @@ isp_handle_platform_atio7(ispsoftc_t *isp, at7_entry_t SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO\n"); atiop->init_id = FC_PORTDB_TGT(isp, chan, lp); - atiop->ccb_h.target_id = FCPARAM(isp, chan)->isp_loopid; + atiop->ccb_h.target_id = ISP_MAX_TARGETS(isp); atiop->ccb_h.target_lun = lun; atiop->sense_len = 0; cdbxlen = aep->at_cmnd.fcp_cmnd_alen_datadir >> FCP_CMND_ADDTL_CDBLEN_SHIFT; @@ -2357,6 +2357,8 @@ isp_handle_platform_target_tmf(ispsoftc_t *isp, isp_no goto bad; } + inot->ccb_h.target_id = ISP_MAX_TARGETS(isp); + inot->ccb_h.target_lun = lun; if (isp_find_pdb_by_portid(isp, notify->nt_channel, notify->nt_sid, &lp) == 0 && isp_find_pdb_by_handle(isp, notify->nt_channel, notify->nt_nphdl, &lp) == 0) { inot->initiator_id = CAM_TARGET_WILDCARD;