Date: Mon, 30 Nov 2015 21:35:43 +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: r291508 - stable/10/sys/dev/isp Message-ID: <201511302135.tAULZh1x069966@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Mon Nov 30 21:35:43 2015 New Revision: 291508 URL: https://svnweb.freebsd.org/changeset/base/291508 Log: MFC r290980: Make firmware handle virtual ports SNS logins for us. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_library.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:35:03 2015 (r291507) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:35:43 2015 (r291508) @@ -2187,7 +2187,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) size_t amt = 0; uint8_t *off; - vpinfo.vp_global_options = 0; + vpinfo.vp_global_options = ICB2400_VPGOPT_GEN_RIDA; if (ISP_CAP_VP0(isp)) { vpinfo.vp_global_options |= ICB2400_VPGOPT_VP0_DECOUPLE; vpinfo.vp_count = isp->isp_nchan; @@ -2207,7 +2207,8 @@ isp_fibre_init_2400(ispsoftc_t *isp) ISP_MEMZERO(&pi, sizeof (pi)); fcp2 = FCPARAM(isp, chan); if (fcp2->role != ISP_ROLE_NONE) { - pi.vp_port_options = ICB2400_VPOPT_ENABLED; + pi.vp_port_options = ICB2400_VPOPT_ENABLED | + ICB2400_VPOPT_ENA_SNSLOGIN; if (fcp2->role & ISP_ROLE_INITIATOR) pi.vp_port_options |= ICB2400_VPOPT_INI_ENABLE; if ((fcp2->role & ISP_ROLE_TARGET) == 0) @@ -2914,16 +2915,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha } else { fcp->isp_fabric_params = 0; } - if (chan) { - fcp->isp_sns_hdl = NPH_RESERVED - chan; - r = isp_plogx(isp, chan, fcp->isp_sns_hdl, SNS_PORT_ID, PLOGX_FLG_CMD_PLOGI | PLOGX_FLG_COND_PLOGI | PLOGX_FLG_SKIP_PRLI, 0); - if (r) { - isp_prt(isp, ISP_LOGWARN, "%s: Chan %d cannot log into SNS", __func__, chan); - return (-1); - } - } else { - fcp->isp_sns_hdl = NPH_SNS_ID; - } + fcp->isp_sns_hdl = NPH_SNS_ID; r = isp_register_fc4_type_24xx(isp, chan); } else { fcp->isp_sns_hdl = SNS_ID; @@ -3167,7 +3159,7 @@ fail: * Don't scan "special" ids. */ if (ISP_CAP_2KLOGIN(isp)) { - if (handle >= NPH_RESERVED - isp->isp_nchan) + if (handle >= NPH_RESERVED) continue; } else { if (handle >= FL_ID && handle <= SNS_ID) @@ -4276,7 +4268,7 @@ isp_next_handle(ispsoftc_t *isp, uint16_ handle = *ohp; if (ISP_CAP_2KLOGIN(isp)) { minh = 0; - maxh = NPH_RESERVED - isp->isp_nchan; /* Reserve for SNS */ + maxh = NPH_RESERVED; } else { minh = SNS_ID + 1; maxh = NPH_MAX - 1; Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:35:03 2015 (r291507) +++ stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:35:43 2015 (r291508) @@ -604,7 +604,8 @@ isp_fc_enable_vp(ispsoftc_t *isp, int ch vp->vp_mod_cnt = 1; vp->vp_mod_idx0 = chan; vp->vp_mod_cmd = VP_MODIFY_ENA; - vp->vp_mod_ports[0].options = ICB2400_VPOPT_ENABLED; + vp->vp_mod_ports[0].options = ICB2400_VPOPT_ENABLED | + ICB2400_VPOPT_ENA_SNSLOGIN; if (fcp->role & ISP_ROLE_INITIATOR) { vp->vp_mod_ports[0].options |= ICB2400_VPOPT_INI_ENABLE; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511302135.tAULZh1x069966>