From owner-svn-src-stable@freebsd.org Fri Mar 8 00:54:36 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E02B152D0C5; Fri, 8 Mar 2019 00:54:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BAC6831AB; Fri, 8 Mar 2019 00:54:35 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8EE6D23C4F; Fri, 8 Mar 2019 00:54:35 +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 x280sZ3p091923; Fri, 8 Mar 2019 00:54:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x280sZlx091922; Fri, 8 Mar 2019 00:54:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903080054.x280sZlx091922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 8 Mar 2019 00:54:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344908 - in stable/12: share/man/man4 sys/dev/isp X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/isp X-SVN-Commit-Revision: 344908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9BAC6831AB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 00:54:36 -0000 Author: mav Date: Fri Mar 8 00:54:34 2019 New Revision: 344908 URL: https://svnweb.freebsd.org/changeset/base/344908 Log: MFC r344660: Add to isp(4) tunables to limit MSI/MSI-X usage. There are some problem reports possibly related to the new driver use of multiple interrupts on older cards. Hopefully this allow to workaround them. Modified: stable/12/share/man/man4/isp.4 stable/12/sys/dev/isp/isp_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/isp.4 ============================================================================== --- stable/12/share/man/man4/isp.4 Fri Mar 8 00:53:33 2019 (r344907) +++ stable/12/share/man/man4/isp.4 Fri Mar 8 00:54:34 2019 (r344908) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 27, 2018 +.Dd February 28, 2019 .Dt ISP 4 .Os .Sh NAME @@ -163,15 +163,19 @@ The following options are switchable by setting values .Pp They are: .Bl -tag -width indent -.It Va hint.isp.0.fwload_disable +.It Va hint.isp. Ns Ar N Ns Va .msi +Limit on number of Message Signaled Interrupts (MSI) to be used. +.It Va hint.isp. Ns Ar N Ns Va .msix +Limit on number of Extended Message Signaled Interrupts (MSI-X) to be used. +.It Va hint.isp. Ns Ar N Ns Va .fwload_disable A hint value to disable loading of firmware .Xr ispfw 4 . -.It Va hint.isp.0.ignore_nvram +.It Va hint.isp. Ns Ar N Ns Va .ignore_nvram A hint value to ignore board NVRAM settings for. Otherwise use NVRAM settings. -.It Va hint.isp.0.fullduplex +.It Va hint.isp. Ns Ar N Ns Va .fullduplex A hint value to set full duplex mode. -.It Va hint.isp.0.topology +.It Va hint.isp. Ns Ar N Ns Va .topology A hint value to select topology of connection. Supported values are: .Pp @@ -185,48 +189,48 @@ Loopback only. .It Li nport-only Point to point only. .El -.It Va hint.isp.0.portwwn +.It Va hint.isp. Ns Ar N Ns Va .portwwn This should be the full 64 bit World Wide Port Name you would like to use, overriding the value in NVRAM for the card. -.It Va hint.isp.0.nodewwn +.It Va hint.isp. Ns Ar N Ns Va .nodewwn This should be the full 64 bit World Wide Node Name you would like to use, overriding the value in NVRAM for the card. -.It Va hint.isp.0.iid +.It Va hint.isp. Ns Ar N Ns Va .iid A hint to override or set the Initiator ID or Loop ID. For Fibre Channel cards in Local Loop topologies it is .Ar strongly recommended that you set this value to non-zero. -.It Va hint.isp.0.role +.It Va hint.isp. Ns Ar N Ns Va .role A hint to define default role for isp instance (0 -- none, 1 -- target, 2 -- initiator, 3 -- both). -.It Va hint.isp.0.debug +.It Va hint.isp. Ns Ar N Ns Va .debug A hint value for a driver debug level (see the file .Pa /usr/src/sys/dev/isp/ispvar.h for the values. -.It Va hint.isp.0.vports +.It Va hint.isp. Ns Ar N Ns Va .vports A hint to create specified number of additional virtual ports. -.It Va hint.isp.0.nofctape +.It Va hint.isp. Ns Ar N Ns Va .nofctape Set this to 1 to disable FC-Tape operation on the given isp instance. -.It Va hint.isp.0.fctape +.It Va hint.isp. Ns Ar N Ns Va .fctape Set this to 1 to enable FC-Tape operation on the given isp instance for targets that support it. .El .Sh SYSCTL OPTIONS .Bl -tag -width indent -.It Va dev.isp.N.loop_down_limit +.It Va dev.isp. Ns Ar N Ns Va .loop_down_limit This value says how long to wait in seconds after loop has gone down before giving up and expiring all of the devices that were visible. The default is 300 seconds (5 minutes). A separate (nonadjustable) timeout is used when booting to not stop booting on lack of FC connectivity. -.It Va dev.isp.N.gone_device_time +.It Va dev.isp. Ns Ar N Ns Va .gone_device_time This value says how long to wait for devices to reappear if they (temporarily) disappear due to loop or fabric events. While this timeout is running, I/O to those devices will simply be held. -.It Va dev.isp.N.use_gff_id -.It Va dev.isp.N.use_gft_id +.It Va dev.isp. Ns Ar N Ns Va .use_gff_id +.It Va dev.isp. Ns Ar N Ns Va .use_gft_id Setting those options to 0 allows to disable use of GFF_ID and GFT_ID SNS requests during FC fabric scan. It may be useful if switch does not implement them correctly, @@ -234,9 +238,9 @@ preventing some devices from being found. Disabling them may cause unneeded logins to ports not supporting target role or even FCP at all. The default is 1 (enabled). -.It Va dev.isp.N.wwnn +.It Va dev.isp. Ns Ar N Ns Va .wwnn This is the readonly World Wide Node Name value for this port. -.It Va dev.isp.N.wwpn +.It Va dev.isp. Ns Ar N Ns Va .wwpn This is the readonly World Wide Port Name value for this port. .El .Sh SEE ALSO Modified: stable/12/sys/dev/isp/isp_pci.c ============================================================================== --- stable/12/sys/dev/isp/isp_pci.c Fri Mar 8 00:53:33 2019 (r344907) +++ stable/12/sys/dev/isp/isp_pci.c Fri Mar 8 00:54:34 2019 (r344908) @@ -1910,14 +1910,21 @@ isp_pci_irqsetup(ispsoftc_t *isp) ISP_UNLOCK(isp); if (ISP_CAP_MSIX(isp)) { - max_irq = min(ISP_MAX_IRQS, IS_26XX(isp) ? 3 : 2); + max_irq = IS_26XX(isp) ? 3 : 2; + resource_int_value(device_get_name(dev), + device_get_unit(dev), "msix", &max_irq); + max_irq = imin(ISP_MAX_IRQS, max_irq); pcs->msicount = imin(pci_msix_count(dev), max_irq); if (pcs->msicount > 0 && pci_alloc_msix(dev, &pcs->msicount) != 0) pcs->msicount = 0; } if (pcs->msicount == 0) { - pcs->msicount = imin(pci_msi_count(dev), 1); + max_irq = 1; + resource_int_value(device_get_name(dev), + device_get_unit(dev), "msi", &max_irq); + max_irq = imin(1, max_irq); + pcs->msicount = imin(pci_msi_count(dev), max_irq); if (pcs->msicount > 0 && pci_alloc_msi(dev, &pcs->msicount) != 0) pcs->msicount = 0;