Re: git: 87ee63bac69d - main - locks: add a runtime check for missing turnstile

2024-07-16 Thread Alexander Leidinger

Am 2024-07-15 22:13, schrieb John Baldwin:

bugs might have been useful in the log as well.  I think it's fine if 
we want
to have some checks that are always on, but it's currently quite rare 
so

needs a bit more rationale in the log than other changes is all.


Is this a "we want to keep this permanent" change, or is this a "we see 
bugs, we don't know more, let's add this to have more people stumble 
upon it with more info until we know what is causing this and then 
remove it together with a fix" change? I would tend to understand it as 
the later (which maybe should lead to a commit to comment this part as 
such).


Bye,
Alexander.

--
http://www.Leidinger.net alexan...@leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.orgnetch...@freebsd.org  : PGP 0x8F31830F9F2772BF


signature.asc
Description: OpenPGP digital signature


git: f2055611fe56 - main - mergemaster: remove from the tree

2024-07-16 Thread Ed Maste
The branch main has been updated by emaste:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=f2055611fe5624017bd7769c8dc6419c348806ff

commit f2055611fe5624017bd7769c8dc6419c348806ff
Author: Ed Maste 
AuthorDate: 2023-09-09 13:17:16 +
Commit: Ed Maste 
CommitDate: 2024-07-16 12:25:54 +

mergemaster: remove from the tree

Mergemaster has been deprecated for many years, replaced by
etcupdate(8).  Remove it now, in advance of FreeBSD 15.0.

PR: 252417
Reviewed by:imp
Relnotes:   Yes
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45622
---
 ObsoleteFiles.inc   |4 +
 targets/pseudo/userland/Makefile.depend |1 -
 usr.sbin/Makefile   |1 -
 usr.sbin/mergemaster/Makefile   |5 -
 usr.sbin/mergemaster/Makefile.depend|   10 -
 usr.sbin/mergemaster/mergemaster.8  |  485 --
 usr.sbin/mergemaster/mergemaster.sh | 1568 ---
 7 files changed, 4 insertions(+), 2070 deletions(-)

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 19eefda42fe9..f8f0309d6ccf 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -51,6 +51,10 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20240716: retire mergemaster
+OLD_FILES+=usr/sbin/mergemaster
+OLD_FILES+=usr/share/man/man8/mergemaster.8.gz
+
 # 20240527: csh: Remove hardlink /.cshrc
 OLD_FILES+=.cshrc
 
diff --git a/targets/pseudo/userland/Makefile.depend 
b/targets/pseudo/userland/Makefile.depend
index 378531b68cc1..6a844630c999 100644
--- a/targets/pseudo/userland/Makefile.depend
+++ b/targets/pseudo/userland/Makefile.depend
@@ -589,7 +589,6 @@ DIRDEPS+= \
usr.sbin/makemap \
usr.sbin/manctl \
usr.sbin/memcontrol \
-   usr.sbin/mergemaster \
usr.sbin/mfiutil \
usr.sbin/mixer \
usr.sbin/mld6query \
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index 9d6c90d09461..e039cea6ee16 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -38,7 +38,6 @@ SUBDIR=   adduser \
mailwrapper \
makefs \
memcontrol \
-   mergemaster \
mfiutil \
mixer \
mlxcontrol \
diff --git a/usr.sbin/mergemaster/Makefile b/usr.sbin/mergemaster/Makefile
deleted file mode 100644
index 2edda1b9bc05..
--- a/usr.sbin/mergemaster/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-SCRIPTS=mergemaster.sh
-MAN=   mergemaster.8
-
-.include 
-
diff --git a/usr.sbin/mergemaster/Makefile.depend 
b/usr.sbin/mergemaster/Makefile.depend
deleted file mode 100644
index 11aba52f82cf..
--- a/usr.sbin/mergemaster/Makefile.depend
+++ /dev/null
@@ -1,10 +0,0 @@
-# Autogenerated - do NOT edit!
-
-DIRDEPS = \
-
-
-.include 
-
-.if ${DEP_RELDIR} == ${_DEP_RELDIR}
-# local dependencies - needed for -jN in clean tree
-.endif
diff --git a/usr.sbin/mergemaster/mergemaster.8 
b/usr.sbin/mergemaster/mergemaster.8
deleted file mode 100644
index 20d746de347c..
--- a/usr.sbin/mergemaster/mergemaster.8
+++ /dev/null
@@ -1,485 +0,0 @@
-.\" Copyright (c) 1998-2011 Douglas Barton
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"notice, this list of conditions and the following disclaimer in the
-.\"documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 16, 2024
-.Dt MERGEMASTER 8
-.Os
-.Sh NAME
-.Nm mergemaster
-.Nd merge configuration files, et al during an upgrade
-.Sh SYNOPSIS
-.Nm
-.Op Fl scrvhpCP
-.Op Fl a|iFU
-.Op Fl -run-updates=[always|never]
-.Op Fl m Ar /path/to/sources
-.Op Fl t Ar /path/to/temp/root
-.Op Fl d
-.Op Fl u Ar N
-.Op Fl w Ar N
-.Op Fl A Ar Target architecture

git: a948a61a822f - stable/13 - if_vxlan(4): Move the allocating of statistics counters below if_alloc()

2024-07-16 Thread Zhenlei Huang
The branch stable/13 has been updated by zlei:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=a948a61a822f82a99ac58a412621e5546eac6be3

commit a948a61a822f82a99ac58a412621e5546eac6be3
Author: Zhenlei Huang 
AuthorDate: 2024-07-16 15:53:18 +
Commit: Zhenlei Huang 
CommitDate: 2024-07-16 15:53:18 +

if_vxlan(4): Move the allocating of statistics counters below if_alloc()

The MFS of the fix [1] is done but the prerequisite [2] has not been
MFCed to stable/13 branch yet. This results in another potential leak
condition in stable/13 branch. Well `if_alloc(IFT_ETHER)` shall not
fail, but just in case.

This is a direct commit to stable/13.

1. e729e750806d if_vxlan(4): Plug a memory leak
2. 4787572d0580 ifnet: make if_alloc_domain() never fail

Reviewed by:kp
Fixes:  12bd1341d2aa if_vxlan(4): Plug a memory leak
Differential Revision:  https://reviews.freebsd.org/D45972
---
 sys/net/if_vxlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index 2cc9f60cba87..3c074952864c 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -3216,13 +3216,13 @@ vxlan_clone_create(struct if_clone *ifc, int unit, 
caddr_t params)
goto fail;
}
 
-   vxlan_stats_alloc(sc);
ifp = if_alloc(IFT_ETHER);
if (ifp == NULL) {
error = ENOSPC;
goto fail;
}
 
+   vxlan_stats_alloc(sc);
sc->vxl_ifp = ifp;
rm_init(&sc->vxl_lock, "vxlanrm");
callout_init_rw(&sc->vxl_callout, &sc->vxl_lock, 0);



git: f91626be616b - stable/14 - contrib/bc: upgrade to version 6.7.6

2024-07-16 Thread Stefan Eßer
The branch stable/14 has been updated by se:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=f91626be616bf35f7437913d3e11b488d6607d1e

commit f91626be616bf35f7437913d3e11b488d6607d1e
Author: Stefan Eßer 
AuthorDate: 2024-07-09 05:49:27 +
Commit: Stefan Eßer 
CommitDate: 2024-07-16 18:05:14 +

contrib/bc: upgrade to version 6.7.6

This update fixes a potential issue when flushing stdout on exit
fails: longjmp could use an uninitialized target address variable.

Most files are included in this commit due to a changed date in
the copyright note.

(cherry picked from commit a970610a3af63b3f4df5b69d91c6b4093a00ed8f)
---
 contrib/bc/LICENSE.md  |   4 +-
 contrib/bc/MEMORY_BUGS.md  |   7 +
 contrib/bc/Makefile.in |   2 +-
 contrib/bc/NEWS.md |   7 +
 contrib/bc/NOTICE.md   |   2 +-
 contrib/bc/README.md   |   6 +-
 contrib/bc/compile_flags.txt   |  15 +
 contrib/bc/configure.sh|  20 +-
 contrib/bc/gen/bc_help.txt |   2 +-
 contrib/bc/gen/dc_help.txt |   2 +-
 contrib/bc/gen/lib.bc  |   2 +-
 contrib/bc/gen/lib2.bc |   2 +-
 contrib/bc/gen/strgen.c|   4 +-
 contrib/bc/gen/strgen.sh   |   4 +-
 contrib/bc/include/args.h  |   2 +-
 contrib/bc/include/bc.h|  21 +-
 contrib/bc/include/bcl.h   |   2 +-
 contrib/bc/include/dc.h|   5 +-
 contrib/bc/include/file.h  |  26 +-
 contrib/bc/include/history.h   |   2 +-
 contrib/bc/include/lang.h  |   2 +-
 contrib/bc/include/lex.h   |   2 +-
 contrib/bc/include/library.h   |   2 +-
 contrib/bc/include/num.h   |   2 +-
 contrib/bc/include/opt.h   |   2 +-
 contrib/bc/include/parse.h |   2 +-
 contrib/bc/include/program.h   |   2 +-
 contrib/bc/include/rand.h  |   7 +-
 contrib/bc/include/read.h  |   2 +-
 contrib/bc/include/status.h|   6 +-
 contrib/bc/include/vector.h|   2 +-
 contrib/bc/include/version.h   |   4 +-
 contrib/bc/include/vm.h|  12 +-
 contrib/bc/locales/de_DE.ISO8859-1.msg |   2 +-
 contrib/bc/locales/de_DE.UTF-8.msg |   2 +-
 contrib/bc/locales/en_US.msg   |   2 +-
 contrib/bc/locales/es_ES.ISO8859-1.msg |   2 +-
 contrib/bc/locales/es_ES.UTF-8.msg |   2 +-
 contrib/bc/locales/fr_FR.ISO8859-1.msg |   2 +-
 contrib/bc/locales/fr_FR.UTF-8.msg |   2 +-
 contrib/bc/locales/ja_JP.UTF-8.msg |   2 +-
 contrib/bc/locales/ja_JP.eucJP.msg |   2 +-
 contrib/bc/locales/nl_NL.ISO8859-1.msg |   2 +-
 contrib/bc/locales/nl_NL.UTF-8.msg |   2 +-
 contrib/bc/locales/pl_PL.ISO8859-2.msg |   2 +-
 contrib/bc/locales/pl_PL.UTF-8.msg |   2 +-
 contrib/bc/locales/pt_PT.ISO8859-1.msg |   2 +-
 contrib/bc/locales/pt_PT.UTF-8.msg |   2 +-
 contrib/bc/locales/ru_RU.CP1251.msg|   2 +-
 contrib/bc/locales/ru_RU.CP866.msg |   2 +-
 contrib/bc/locales/ru_RU.ISO8859-5.msg |   2 +-
 contrib/bc/locales/ru_RU.KOI8-R.msg|   2 +-
 contrib/bc/locales/ru_RU.UTF-8.msg |   2 +-
 contrib/bc/locales/zh_CN.GB18030.msg   |   2 +-
 contrib/bc/locales/zh_CN.GB2312.msg|   2 +-
 contrib/bc/locales/zh_CN.GBK.msg   |   2 +-
 contrib/bc/locales/zh_CN.UTF-8.msg |   2 +-
 contrib/bc/locales/zh_CN.eucCN.msg |   2 +-
 contrib/bc/manuals/bc/A.1  | 681 +
 contrib/bc/manuals/bc/A.1.md   |   5 +-
 contrib/bc/manuals/bc/E.1  | 482 +++
 contrib/bc/manuals/bc/E.1.md   |   5 +-
 contrib/bc/manuals/bc/EH.1 | 474 ---
 contrib/bc/manuals/bc/EH.1.md  |   5 +-
 contrib/bc/manuals/bc/EHN.1| 474 ---
 contrib/bc/manuals/bc/EHN.1.md |   5 +-
 contrib/bc/manuals/bc/EN.1 | 482 +++
 contrib/bc/manuals/bc/EN.1.md  |   5 +-
 contrib/bc/manuals/bc/H.1  | 673 
 contrib/bc/manuals/bc/H.1.md   |   5 +-
 contrib/bc/manuals/bc/HN.1 | 673 
 contrib/bc/manuals/bc/HN.1.md  |   5 +-
 contrib/bc/manuals/bc/N.1  | 681 +
 contrib/bc/manuals/bc/N.1.md   |   5 +-
 contrib/bc/manuals/bcl.3   |  95 ++---
 contrib/bc/manuals/bcl.3.md|   2 +-
 contrib/bc/manuals/dc/A.1  | 478 +++
 contrib/bc/manuals/dc/A.1.md   |   2 +-
 contrib/bc/manuals/dc/E.1  | 376 +-
 contrib/bc/manuals/dc/E.1.md   |   2 +-
 contrib/bc/manuals/dc/EH.1 | 368 +-
 contrib/bc/manuals/dc/EH.1.md  |   2 +-
 contrib/bc/manuals/dc/EHN.1| 368 ++

git: 4da38c584016 - stable/13 - contrib/bc: upgrade to version 6.7.6

2024-07-16 Thread Stefan Eßer
The branch stable/13 has been updated by se:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4da38c584016be734f343b99a228d05be773e114

commit 4da38c584016be734f343b99a228d05be773e114
Author: Stefan Eßer 
AuthorDate: 2024-07-09 05:49:27 +
Commit: Stefan Eßer 
CommitDate: 2024-07-16 17:52:56 +

contrib/bc: upgrade to version 6.7.6

This update fixes a potential issue when flushing stdout on exit
fails: longjmp could use an uninitialized target address variable.

Most files are included in this commit due to a changed date in
the copyright note.

(cherry picked from commit a970610a3af63b3f4df5b69d91c6b4093a00ed8f)
---
 contrib/bc/LICENSE.md  |   4 +-
 contrib/bc/MEMORY_BUGS.md  |   7 +
 contrib/bc/Makefile.in |   2 +-
 contrib/bc/NEWS.md |   7 +
 contrib/bc/NOTICE.md   |   2 +-
 contrib/bc/README.md   |   6 +-
 contrib/bc/compile_flags.txt   |  15 +
 contrib/bc/configure.sh|  20 +-
 contrib/bc/gen/bc_help.txt |   2 +-
 contrib/bc/gen/dc_help.txt |   2 +-
 contrib/bc/gen/lib.bc  |   2 +-
 contrib/bc/gen/lib2.bc |   2 +-
 contrib/bc/gen/strgen.c|   4 +-
 contrib/bc/gen/strgen.sh   |   4 +-
 contrib/bc/include/args.h  |   2 +-
 contrib/bc/include/bc.h|  21 +-
 contrib/bc/include/bcl.h   |   2 +-
 contrib/bc/include/dc.h|   5 +-
 contrib/bc/include/file.h  |  26 +-
 contrib/bc/include/history.h   |   2 +-
 contrib/bc/include/lang.h  |   2 +-
 contrib/bc/include/lex.h   |   2 +-
 contrib/bc/include/library.h   |   2 +-
 contrib/bc/include/num.h   |   2 +-
 contrib/bc/include/opt.h   |   2 +-
 contrib/bc/include/parse.h |   2 +-
 contrib/bc/include/program.h   |   2 +-
 contrib/bc/include/rand.h  |   7 +-
 contrib/bc/include/read.h  |   2 +-
 contrib/bc/include/status.h|   6 +-
 contrib/bc/include/vector.h|   2 +-
 contrib/bc/include/version.h   |   4 +-
 contrib/bc/include/vm.h|  12 +-
 contrib/bc/locales/de_DE.ISO8859-1.msg |   2 +-
 contrib/bc/locales/de_DE.UTF-8.msg |   2 +-
 contrib/bc/locales/en_US.msg   |   2 +-
 contrib/bc/locales/es_ES.ISO8859-1.msg |   2 +-
 contrib/bc/locales/es_ES.UTF-8.msg |   2 +-
 contrib/bc/locales/fr_FR.ISO8859-1.msg |   2 +-
 contrib/bc/locales/fr_FR.UTF-8.msg |   2 +-
 contrib/bc/locales/ja_JP.UTF-8.msg |   2 +-
 contrib/bc/locales/ja_JP.eucJP.msg |   2 +-
 contrib/bc/locales/nl_NL.ISO8859-1.msg |   2 +-
 contrib/bc/locales/nl_NL.UTF-8.msg |   2 +-
 contrib/bc/locales/pl_PL.ISO8859-2.msg |   2 +-
 contrib/bc/locales/pl_PL.UTF-8.msg |   2 +-
 contrib/bc/locales/pt_PT.ISO8859-1.msg |   2 +-
 contrib/bc/locales/pt_PT.UTF-8.msg |   2 +-
 contrib/bc/locales/ru_RU.CP1251.msg|   2 +-
 contrib/bc/locales/ru_RU.CP866.msg |   2 +-
 contrib/bc/locales/ru_RU.ISO8859-5.msg |   2 +-
 contrib/bc/locales/ru_RU.KOI8-R.msg|   2 +-
 contrib/bc/locales/ru_RU.UTF-8.msg |   2 +-
 contrib/bc/locales/zh_CN.GB18030.msg   |   2 +-
 contrib/bc/locales/zh_CN.GB2312.msg|   2 +-
 contrib/bc/locales/zh_CN.GBK.msg   |   2 +-
 contrib/bc/locales/zh_CN.UTF-8.msg |   2 +-
 contrib/bc/locales/zh_CN.eucCN.msg |   2 +-
 contrib/bc/manuals/bc/A.1  | 681 +
 contrib/bc/manuals/bc/A.1.md   |   5 +-
 contrib/bc/manuals/bc/E.1  | 482 +++
 contrib/bc/manuals/bc/E.1.md   |   5 +-
 contrib/bc/manuals/bc/EH.1 | 474 ---
 contrib/bc/manuals/bc/EH.1.md  |   5 +-
 contrib/bc/manuals/bc/EHN.1| 474 ---
 contrib/bc/manuals/bc/EHN.1.md |   5 +-
 contrib/bc/manuals/bc/EN.1 | 482 +++
 contrib/bc/manuals/bc/EN.1.md  |   5 +-
 contrib/bc/manuals/bc/H.1  | 673 
 contrib/bc/manuals/bc/H.1.md   |   5 +-
 contrib/bc/manuals/bc/HN.1 | 673 
 contrib/bc/manuals/bc/HN.1.md  |   5 +-
 contrib/bc/manuals/bc/N.1  | 681 +
 contrib/bc/manuals/bc/N.1.md   |   5 +-
 contrib/bc/manuals/bcl.3   |  95 ++---
 contrib/bc/manuals/bcl.3.md|   2 +-
 contrib/bc/manuals/dc/A.1  | 478 +++
 contrib/bc/manuals/dc/A.1.md   |   2 +-
 contrib/bc/manuals/dc/E.1  | 376 +-
 contrib/bc/manuals/dc/E.1.md   |   2 +-
 contrib/bc/manuals/dc/EH.1 | 368 +-
 contrib/bc/manuals/dc/EH.1.md  |   2 +-
 contrib/bc/manuals/dc/EHN.1| 368 ++

git: afd67a167799 - main - etcupdate(8): improve phrasing

2024-07-16 Thread Ed Maste
The branch main has been updated by emaste:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=afd67a1677999b0f9d82d29bfd7c767f665e76e8

commit afd67a1677999b0f9d82d29bfd7c767f665e76e8
Author: Ed Maste 
AuthorDate: 2024-07-16 01:44:11 +
Commit: Ed Maste 
CommitDate: 2024-07-16 19:17:31 +

etcupdate(8): improve phrasing

Reported by:igor(1)
---
 usr.sbin/etcupdate/etcupdate.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8
index 22d3d91bb6eb..bf7ddb792907 100644
--- a/usr.sbin/etcupdate/etcupdate.8
+++ b/usr.sbin/etcupdate/etcupdate.8
@@ -485,7 +485,7 @@ as additional parameters to
 when building a
 .Dq current
 tree.
-This can be used for to set the
+This can be used to set the
 .Dv TARGET
 or
 .Dv TARGET_ARCH



git: 4c0c82355692 - stable/13 - isp(4): Document support for new devices

2024-07-16 Thread Kenneth D. Merry
The branch stable/13 has been updated by ken:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4c0c82355692753cf10c35b893fe4b8a01a08e12

commit 4c0c82355692753cf10c35b893fe4b8a01a08e12
Author: Joerg Pulz 
AuthorDate: 2023-07-07 21:43:34 +
Commit: Kenneth D. Merry 
CommitDate: 2024-07-16 19:59:40 +

isp(4): Document support for new devices

Add 28xx based HBAs to manpage.

PR: 271062
Reviewed by: imp, mav
Sponsored by: Technical University of Munich
Pull Request: https://github.com/freebsd/freebsd-src/pull/726

(cherry picked from commit 2b4ccfbbc65b2f140fab6db998e9654c5c2bb972)
---
 share/man/man4/isp.4 | 8 
 1 file changed, 8 insertions(+)

diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4
index 810d1ce4650c..350a0ea59a64 100644
--- a/share/man/man4/isp.4
+++ b/share/man/man4/isp.4
@@ -106,6 +106,14 @@ Optical 16Gb FC/FCoE PCIe cards.
 Optical 16Gb Fibre Channel PCIe cards.
 .It Qlogic 2740/2742/2764 (aka 2722/2714)
 Optical 32Gb Fibre Channel PCIe cards.
+.It Qlogic QLE2770/QLE2772 (aka 2812)
+Optical 32Gb Fibre Channel PCIe cards.
+.It Qlogic QLE2774 (aka 2814)
+Optical 32Gb Fibre Channel PCIe cards.
+.It Qlogic QLE2870/QLE2872 (aka 2812)
+Optical 64Gb Fibre Channel PCIe cards.
+.It Qlogic QLE2874 (aka 2814)
+Optical 64Gb Fibre Channel PCIe cards.
 .El
 .Sh CONFIGURATION OPTIONS
 Target mode support for Fibre Channel adapters may be enabled with the



git: ff9458b30fc3 - stable/14 - Fix the isp(4) driver with 9.x firmware.

2024-07-16 Thread Kenneth D. Merry
The branch stable/14 has been updated by ken:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ff9458b30fc3b8748f65eca792be7b6e64c639bf

commit ff9458b30fc3b8748f65eca792be7b6e64c639bf
Author: Kenneth D. Merry 
AuthorDate: 2024-06-21 19:30:59 +
Commit: Kenneth D. Merry 
CommitDate: 2024-07-16 20:04:29 +

Fix the isp(4) driver with 9.x firmware.

The isp(4) driver (and ispfw(4) firmware) previously only included
firmware for Qlogic controllers up to 8Gb.  It recently gained
firmware for the 27XX and 28XX series controllers along with
improved firmware loading capabilities.

The 9.x firmware available for the 27XX and 28XX controllers in
ispfw(4) adds login state for NVMe devices in the top nibble of
the login state in the port database (isp_pdb_24xx_t in ispmbox.h).

This breaks the check at the end of isp_getpdb() to make sure the
device is in the right login state.  As a result, it breaks device
discovery for many (perhaps all?) FC devices.  In my testing with
IBM LTO-6 drives attached to a quad port 16Gb Qlogic 2714, they
don't show up when they are directly connected (and in loop mode)
or connected via a switch (and in fabric mode).

So, mask off the top bits of of the login state before checking it.
This shouldn't break anything, because all of the existing login
states defined in ispmbox.h are in the low nibble.

sys/dev/isp/ispmbox.h:
Add a FCP login state mask define, and a NVMe login state
shift.

sys/dev/isp/isp.c:
In isp_getpdb(), make sure we're only looking at the FCP
login state bits when we try to determine whether a device
is in the right login state.

MFC after:  1 week
Sponsored by:   Spectra Logic
Reviewed by:mav
Differential Revision:  

(cherry picked from commit 137b004e2b7ab504abf98c4aad9d52607df47b9a)
---
 sys/dev/isp/isp.c | 10 +-
 sys/dev/isp/ispmbox.h |  6 ++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index ad6dbd1e6f76..7246ea8031ac 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -1539,7 +1539,15 @@ isp_getpdb(ispsoftc_t *isp, int chan, uint16_t id, 
isp_pdb_t *pdb)
chan, id, pdb->portid, un.bill.pdb_flags,
un.bill.pdb_curstate, un.bill.pdb_laststate);
 
-   if (un.bill.pdb_curstate < PDB2400_STATE_PLOGI_DONE || 
un.bill.pdb_curstate > PDB2400_STATE_LOGGED_IN) {
+   /*
+* XXX KDM this is broken for NVMe.  Need to determine whether this
+* is an NVMe target, and if so, check the NVMe status bits. We are
+* probably missing more bits for proper NVMe support, though.
+*/
+   if (((un.bill.pdb_curstate & PDB2400_STATE_FCP_MASK) <
+ PDB2400_STATE_PLOGI_DONE)
+|| ((un.bill.pdb_curstate & PDB2400_STATE_FCP_MASK) >
+ PDB2400_STATE_LOGGED_IN)) {
mbs.param[0] = MBOX_NOT_LOGGED_IN;
return (mbs.param[0]);
}
diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h
index c6ac9d9ce971..978ed4dc1638 100644
--- a/sys/dev/isp/ispmbox.h
+++ b/sys/dev/isp/ispmbox.h
@@ -890,6 +890,10 @@ typedef struct {
 #definePDB2400_CLASS2  0x0010
 #definePDB2400_ADDR_VALID  0x0002
 
+/*
+ * For NVMe, the state is the high nibble.  For FCP, the state is the low
+ * nibble.  This appears to have changed with the 9.x firmware.
+ */
 #definePDB2400_STATE_PLOGI_PEND0x03
 #definePDB2400_STATE_PLOGI_DONE0x04
 #definePDB2400_STATE_PRLI_PEND 0x05
@@ -897,6 +901,8 @@ typedef struct {
 #definePDB2400_STATE_PORT_UNAVAIL  0x07
 #definePDB2400_STATE_PRLO_PEND 0x09
 #definePDB2400_STATE_LOGO_PEND 0x0B
+#definePDB2400_STATE_FCP_MASK  0x0f
+#definePDB2400_STATE_NVME_SHIFT4
 
 /*
  * Common elements from the above two structures that are actually useful to 
us.



git: 44ca5d40f367 - stable/14 - Add an isp(4) tunable to default to ispfw(4) firmware.

2024-07-16 Thread Kenneth D. Merry
The branch stable/14 has been updated by ken:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=44ca5d40f36704ffa2fa55f8f1403c824400b3ba

commit 44ca5d40f36704ffa2fa55f8f1403c824400b3ba
Author: Kenneth D. Merry 
AuthorDate: 2024-06-24 19:42:41 +
Commit: Kenneth D. Merry 
CommitDate: 2024-07-16 20:06:39 +

Add an isp(4) tunable to default to ispfw(4) firmware.

ispfw(4) recently gained firmware for Qlogic 27XX and 28XX
FC controllers, and isp(4) now selects the newer of firmware in
flash or in ispfw(4) to load for those controllers.

This differs from the previous behavior (which remains for older
controllers), which was to always load the ispfw(4) firmware if it
is available.

This adds a loader tunable, hint.isp.N.fwload_force to default to
loading the ispfw(4) firmware, whether or not it is newer than the
firmware in flash.  This allows the user to always use the known
firmware version included with the kernel.

Note that there is an existing fwload_disable tunable that tells
the driver to always load the firmware from flash and ignore
ispfw(4).  If fwload_disable is set, fwload_force will be ignored.
So users with existing fwload_disable tunables will have the same
behavior.

If a user specifies both fwload_force and fwload_disable for the
same controller, the isp(4) driver prints a warning message,
and fwload_disable will be honored.

The user can see which firmware is active through the
dev.isp.N.fw_version* sysctl variables.

share/man/man4/isp.4:
Document the new loader tunable.

sys/dev/isp/isp.c:
In isp_load_risc_flash(), changet the decision logic to
also consider ISP_CFG_FWLOAD_ONLY.  Load the flash firmware
and get the version, so the user knows what it is, but if
the user set fwload_force, honor that.  If the user didn't
set fwload_force, the behavior remains to select the newer
firmware version.

sys/dev/isp/isp_pci.c:
Add a new fwload_force tunable.  Print out a warning if the
user sets both fwload_disable and fwload_force.

sys/dev/isp/ispvar.h:
Add a new ISP_CFG_FWLOAD_FORCE configuration bit.

Reviewed by:mav
MFC after:  1 week
Sponsored by:   Spectra Logic
Differential Revision:  

(cherry picked from commit 31354813f3c6e87532189be77c2f10a017c55472)
---
 share/man/man4/isp.4  | 17 -
 sys/dev/isp/isp.c | 18 +-
 sys/dev/isp/isp_pci.c |  9 +
 sys/dev/isp/ispvar.h  |  1 +
 4 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4
index 350a0ea59a64..dc6a6dbd5d2b 100644
--- a/share/man/man4/isp.4
+++ b/share/man/man4/isp.4
@@ -24,7 +24,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 27, 2023
+.Dd June 24, 2024
 .Dt ISP 4
 .Os
 .Sh NAME
@@ -141,6 +141,21 @@ 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 provided by
 .Xr ispfw 4 .
+.It Va hint.isp. Ns Ar N Ns Va .fwload_force
+A hint value to prefer firmware provided by
+.Xr ispfw 4 ,
+even if it is older than the firmware in flash on the board.
+If fwload_disable is also specified, fwload_force will be ignored.
+.Pp
+By default, with 27XX and newer controllers, the
+.Xr isp 4
+driver will use the newer
+firmware.
+For older controllers, the
+.Xr isp 4
+driver will use the firmware provided by
+.Xr ispfw 4
+if it is available, and otherwise use the firmware in flash on the board.
 .It Va hint.isp. Ns Ar N Ns Va .ignore_nvram
 A hint value to ignore board NVRAM settings for.
 Otherwise use NVRAM settings.
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index 7246ea8031ac..14d8147c3562 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -457,7 +457,10 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults)
if (IS_27XX(isp)) {
switch (isp_load_risc(isp, 0)) {
case ISP_ABORTED:
-   /* download ispfw(4) as it's newer than flash */
+   /*
+* download ispfw(4) as it's newer than flash, or
+* the user requested it.
+*/
dodnld = 1;
break;
case ISP_SUCCESS:
@@ -5223,7 +5226,20 @@ isp_load_risc_flash(ispsoftc_t *isp, uint32_t 
*srisc_addr, uint32_t faddr)
 
/* If ispfw(4) is loaded compare versions and use the newest */
if (isp->isp_osinfo.ispfw != NULL) {
+   int ispfw_newer = 0;
+
if (ISP_

git: 4c94657e168d - stable/13 - Fix the isp(4) driver with 9.x firmware.

2024-07-16 Thread Kenneth D. Merry
The branch stable/13 has been updated by ken:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4c94657e168de3f45a423d65289b349fa7d69206

commit 4c94657e168de3f45a423d65289b349fa7d69206
Author: Kenneth D. Merry 
AuthorDate: 2024-06-21 19:30:59 +
Commit: Kenneth D. Merry 
CommitDate: 2024-07-16 20:08:52 +

Fix the isp(4) driver with 9.x firmware.

The isp(4) driver (and ispfw(4) firmware) previously only included
firmware for Qlogic controllers up to 8Gb.  It recently gained
firmware for the 27XX and 28XX series controllers along with
improved firmware loading capabilities.

The 9.x firmware available for the 27XX and 28XX controllers in
ispfw(4) adds login state for NVMe devices in the top nibble of
the login state in the port database (isp_pdb_24xx_t in ispmbox.h).

This breaks the check at the end of isp_getpdb() to make sure the
device is in the right login state.  As a result, it breaks device
discovery for many (perhaps all?) FC devices.  In my testing with
IBM LTO-6 drives attached to a quad port 16Gb Qlogic 2714, they
don't show up when they are directly connected (and in loop mode)
or connected via a switch (and in fabric mode).

So, mask off the top bits of of the login state before checking it.
This shouldn't break anything, because all of the existing login
states defined in ispmbox.h are in the low nibble.

sys/dev/isp/ispmbox.h:
Add a FCP login state mask define, and a NVMe login state
shift.

sys/dev/isp/isp.c:
In isp_getpdb(), make sure we're only looking at the FCP
login state bits when we try to determine whether a device
is in the right login state.

MFC after:  1 week
Sponsored by:   Spectra Logic
Reviewed by:mav
Differential Revision:  

(cherry picked from commit 137b004e2b7ab504abf98c4aad9d52607df47b9a)
---
 sys/dev/isp/isp.c | 10 +-
 sys/dev/isp/ispmbox.h |  6 ++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index ad6dbd1e6f76..7246ea8031ac 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -1539,7 +1539,15 @@ isp_getpdb(ispsoftc_t *isp, int chan, uint16_t id, 
isp_pdb_t *pdb)
chan, id, pdb->portid, un.bill.pdb_flags,
un.bill.pdb_curstate, un.bill.pdb_laststate);
 
-   if (un.bill.pdb_curstate < PDB2400_STATE_PLOGI_DONE || 
un.bill.pdb_curstate > PDB2400_STATE_LOGGED_IN) {
+   /*
+* XXX KDM this is broken for NVMe.  Need to determine whether this
+* is an NVMe target, and if so, check the NVMe status bits. We are
+* probably missing more bits for proper NVMe support, though.
+*/
+   if (((un.bill.pdb_curstate & PDB2400_STATE_FCP_MASK) <
+ PDB2400_STATE_PLOGI_DONE)
+|| ((un.bill.pdb_curstate & PDB2400_STATE_FCP_MASK) >
+ PDB2400_STATE_LOGGED_IN)) {
mbs.param[0] = MBOX_NOT_LOGGED_IN;
return (mbs.param[0]);
}
diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h
index c6ac9d9ce971..978ed4dc1638 100644
--- a/sys/dev/isp/ispmbox.h
+++ b/sys/dev/isp/ispmbox.h
@@ -890,6 +890,10 @@ typedef struct {
 #definePDB2400_CLASS2  0x0010
 #definePDB2400_ADDR_VALID  0x0002
 
+/*
+ * For NVMe, the state is the high nibble.  For FCP, the state is the low
+ * nibble.  This appears to have changed with the 9.x firmware.
+ */
 #definePDB2400_STATE_PLOGI_PEND0x03
 #definePDB2400_STATE_PLOGI_DONE0x04
 #definePDB2400_STATE_PRLI_PEND 0x05
@@ -897,6 +901,8 @@ typedef struct {
 #definePDB2400_STATE_PORT_UNAVAIL  0x07
 #definePDB2400_STATE_PRLO_PEND 0x09
 #definePDB2400_STATE_LOGO_PEND 0x0B
+#definePDB2400_STATE_FCP_MASK  0x0f
+#definePDB2400_STATE_NVME_SHIFT4
 
 /*
  * Common elements from the above two structures that are actually useful to 
us.



git: 12f7f57bc07d - stable/13 - Add an isp(4) tunable to default to ispfw(4) firmware.

2024-07-16 Thread Kenneth D. Merry
The branch stable/13 has been updated by ken:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=12f7f57bc07d85158e67c61b83a4269c9d269fdf

commit 12f7f57bc07d85158e67c61b83a4269c9d269fdf
Author: Kenneth D. Merry 
AuthorDate: 2024-06-24 19:42:41 +
Commit: Kenneth D. Merry 
CommitDate: 2024-07-16 20:36:32 +

Add an isp(4) tunable to default to ispfw(4) firmware.

ispfw(4) recently gained firmware for Qlogic 27XX and 28XX
FC controllers, and isp(4) now selects the newer of firmware in
flash or in ispfw(4) to load for those controllers.

This differs from the previous behavior (which remains for older
controllers), which was to always load the ispfw(4) firmware if it
is available.

This adds a loader tunable, hint.isp.N.fwload_force to default to
loading the ispfw(4) firmware, whether or not it is newer than the
firmware in flash.  This allows the user to always use the known
firmware version included with the kernel.

Note that there is an existing fwload_disable tunable that tells
the driver to always load the firmware from flash and ignore
ispfw(4).  If fwload_disable is set, fwload_force will be ignored.
So users with existing fwload_disable tunables will have the same
behavior.

If a user specifies both fwload_force and fwload_disable for the
same controller, the isp(4) driver prints a warning message,
and fwload_disable will be honored.

The user can see which firmware is active through the
dev.isp.N.fw_version* sysctl variables.

share/man/man4/isp.4:
Document the new loader tunable.

sys/dev/isp/isp.c:
In isp_load_risc_flash(), changet the decision logic to
also consider ISP_CFG_FWLOAD_ONLY.  Load the flash firmware
and get the version, so the user knows what it is, but if
the user set fwload_force, honor that.  If the user didn't
set fwload_force, the behavior remains to select the newer
firmware version.

sys/dev/isp/isp_pci.c:
Add a new fwload_force tunable.  Print out a warning if the
user sets both fwload_disable and fwload_force.

sys/dev/isp/ispvar.h:
Add a new ISP_CFG_FWLOAD_FORCE configuration bit.

Reviewed by:mav
MFC after:  1 week
Sponsored by:   Spectra Logic
Differential Revision:  

(cherry picked from commit 31354813f3c6e87532189be77c2f10a017c55472)
---
 share/man/man4/isp.4  | 17 -
 sys/dev/isp/isp.c | 18 +-
 sys/dev/isp/isp_pci.c |  9 +
 sys/dev/isp/ispvar.h  |  1 +
 4 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4
index 350a0ea59a64..dc6a6dbd5d2b 100644
--- a/share/man/man4/isp.4
+++ b/share/man/man4/isp.4
@@ -24,7 +24,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 27, 2023
+.Dd June 24, 2024
 .Dt ISP 4
 .Os
 .Sh NAME
@@ -141,6 +141,21 @@ 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 provided by
 .Xr ispfw 4 .
+.It Va hint.isp. Ns Ar N Ns Va .fwload_force
+A hint value to prefer firmware provided by
+.Xr ispfw 4 ,
+even if it is older than the firmware in flash on the board.
+If fwload_disable is also specified, fwload_force will be ignored.
+.Pp
+By default, with 27XX and newer controllers, the
+.Xr isp 4
+driver will use the newer
+firmware.
+For older controllers, the
+.Xr isp 4
+driver will use the firmware provided by
+.Xr ispfw 4
+if it is available, and otherwise use the firmware in flash on the board.
 .It Va hint.isp. Ns Ar N Ns Va .ignore_nvram
 A hint value to ignore board NVRAM settings for.
 Otherwise use NVRAM settings.
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index 7246ea8031ac..14d8147c3562 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -457,7 +457,10 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults)
if (IS_27XX(isp)) {
switch (isp_load_risc(isp, 0)) {
case ISP_ABORTED:
-   /* download ispfw(4) as it's newer than flash */
+   /*
+* download ispfw(4) as it's newer than flash, or
+* the user requested it.
+*/
dodnld = 1;
break;
case ISP_SUCCESS:
@@ -5223,7 +5226,20 @@ isp_load_risc_flash(ispsoftc_t *isp, uint32_t 
*srisc_addr, uint32_t faddr)
 
/* If ispfw(4) is loaded compare versions and use the newest */
if (isp->isp_osinfo.ispfw != NULL) {
+   int ispfw_newer = 0;
+
if (ISP_