git: 8e1c989abbd1 - main - Don't build and install {llvm, clang, lldb}-tblgen for the target
The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=8e1c989abbd1db4dac5b2149886012d43e27b9a9 commit 8e1c989abbd1db4dac5b2149886012d43e27b9a9 Author: Alex Richardson AuthorDate: 2021-09-06 08:31:58 + Commit: Alex Richardson CommitDate: 2021-09-06 08:32:41 + Don't build and install {llvm,clang,lldb}-tblgen for the target The tablegen binaries are only needed to build software that uses LLVM's infrastructure for command line options, disassembler tables, etc. They are not user-facing binaries and should therefore not be installed by default. Reviewed By:emaste Differential Revision: https://reviews.freebsd.org/D31058 --- ObsoleteFiles.inc | 5 + usr.bin/clang/Makefile | 6 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index db8441716091..5879ddfc3185 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,6 +40,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20210906: stop installing {llvm,clang,lldb}-tblgen +OLD_FILES+=usr/bin/llvm-tblgen +OLD_FILES+=usr/bin/clang-tblgen +OLD_FILES+=usr/bin/lldb-tblgen + # 20210810: remove Pentium-related man pages and references OLD_FILES+=usr/share/man/man3/pmc.p4.3.gz OLD_FILES+=usr/share/man/man3/pmc.p5.3.gz diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile index ca68c37b51c1..1c53e94965f7 100644 --- a/usr.bin/clang/Makefile +++ b/usr.bin/clang/Makefile @@ -2,12 +2,8 @@ .include +.if ${MK_CLANG} != "no" SUBDIR+= clang -SUBDIR+= clang-tblgen -SUBDIR+= llvm-tblgen - -.if ${MK_LLDB} != "no" -SUBDIR+= lldb-tblgen .endif .if !defined(TOOLS_PREFIX) ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: e7e22476d1d7 - main - Don't default MK_LLVM_TARGET_ALL to yes unless MK_CLANG is requested
The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=e7e22476d1d7864ce59b6eace85d4d4000b81543 commit e7e22476d1d7864ce59b6eace85d4d4000b81543 Author: Alex Richardson AuthorDate: 2021-09-06 08:31:24 + Commit: Alex Richardson CommitDate: 2021-09-06 08:31:25 + Don't default MK_LLVM_TARGET_ALL to yes unless MK_CLANG is requested When building -DWITH_LLVM_BINUTILS -DWITHOUT_CLANG, this avoids building a few hundred C++ source files that should not be needed by default. Reviewed By:emaste Differential Revision: https://reviews.freebsd.org/D31059 --- share/mk/src.opts.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index bd360dd1ad29..32346e31a752 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -130,7 +130,6 @@ __DEFAULT_YES_OPTIONS = \ LLVM_ASSERTIONS \ LLVM_COV \ LLVM_CXXFILT \ -LLVM_TARGET_ALL \ LOADER_GELI \ LOADER_LUA \ LOADER_OFW \ @@ -216,6 +215,7 @@ __DEFAULT_NO_OPTIONS = \ # RIGHT option is disabled. __DEFAULT_DEPENDENT_OPTIONS= \ CLANG_FULL/CLANG \ + LLVM_TARGET_ALL/CLANG \ LOADER_VERIEXEC/BEARSSL \ LOADER_EFI_SECUREBOOT/LOADER_VERIEXEC \ LOADER_VERIEXEC_VECTX/LOADER_VERIEXEC \ ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 021385aba562 - main - Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain
The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=021385aba56279febcfdcc64d23673a0106ae45d commit 021385aba56279febcfdcc64d23673a0106ae45d Author: Alex Richardson AuthorDate: 2021-09-06 08:49:49 + Commit: Alex Richardson CommitDate: 2021-09-06 08:49:49 + Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain When WITH_LLVM_BINUTILS is set, we will install the LLVM binutils as ar/ranlib/nm/objcopy/etc. instead of the elftoolchain ones. Having the LLVM binutils instead of the elftoolchain ones allows us to use features such as LTO that depend on binutils that understand LLVM IR. Another benefit will be an improved user-experience when compiling with AddressSanitizer, since ASAN does not symbolize backtraces correctly if addr2line is elftoolchain addr2line instead of llvm-symbolizer. See https://lists.freebsd.org/archives/freebsd-toolchain/2021-July/62.html for more details. This is currently off by default but will be turned on by default at some point in the near future. Reviewed By:emaste Differential Revision: https://reviews.freebsd.org/D31060 --- Makefile.inc1 | 4 +++- lib/Makefile | 5 - lib/clang/Makefile | 4 +++- lib/clang/libllvm/Makefile | 6 +++--- share/mk/src.opts.mk | 8 tools/build/options/WITH_LLVM_BINUTILS | 2 ++ usr.bin/Makefile | 16 +++- usr.bin/clang/Makefile | 13 + usr.bin/clang/llvm-ar/Makefile | 7 +++ usr.bin/clang/llvm-nm/Makefile | 7 +++ usr.bin/clang/llvm-objcopy/Makefile| 7 +++ usr.bin/clang/llvm-objdump/Makefile| 7 +++ usr.bin/clang/llvm-size/Makefile | 7 +++ usr.bin/clang/llvm-symbolizer/Makefile | 7 +++ 14 files changed, 85 insertions(+), 15 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index b59c1913f8ce..478824675382 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -771,6 +771,7 @@ XMAKE= ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ MK_CLANG_IS_CC=${MK_CLANG_BOOTSTRAP} \ MK_LLDB=no \ + MK_LLVM_BINUTILS=no \ MK_TESTS=no # kernel-tools stage @@ -2339,9 +2340,10 @@ _gensnmptree=usr.sbin/bsnmpd/gensnmptree # We need to build tblgen when we're building clang or lld, either as # bootstrap tools, or as the part of the normal build. +# llvm-tblgen is also needed for various llvm binutils (e.g. objcopy). .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" || \ ${MK_LLD_BOOTSTRAP} != "no" || ${MK_LLD} != "no" || \ -${MK_LLDB} != "no" +${MK_LLDB} != "no" || ${MK_LLVM_BINUTILS} != "no" _clang_tblgen= \ lib/clang/libllvmminimal \ usr.bin/clang/llvm-tblgen diff --git a/lib/Makefile b/lib/Makefile index 674368a19ffd..1e375bb456e6 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -157,7 +157,10 @@ SUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp SUBDIR.${MK_BSNMP}+= libbsnmp .if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP) -SUBDIR.${MK_CLANG}+= clang +.if ${MK_CLANG} != "no" || ${MK_LLD} != "no" || \ +${MK_LLDB} != "no" || ${MK_LLVM_BINUTILS} != "no" +SUBDIR+= clang +.endif .endif SUBDIR.${MK_CUSE}+=libcuse diff --git a/lib/clang/Makefile b/lib/clang/Makefile index bc09ea62dc67..df4aa01a2653 100644 --- a/lib/clang/Makefile +++ b/lib/clang/Makefile @@ -4,10 +4,12 @@ # These have to be built in order. SUBDIR=libllvm +.if ${MK_CLANG} != "no" SUBDIR+= libclang +SUBDIR+= headers +.endif .if ${MK_LLDB} != "no" SUBDIR+= liblldb .endif -SUBDIR+= headers .include diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile index 09d6336c01d9..7eaedf65dcb3 100644 --- a/lib/clang/libllvm/Makefile +++ b/lib/clang/libllvm/Makefile @@ -830,7 +830,7 @@ SRCS_MIN+= Object/IRObjectFile.cpp SRCS_MIN+= Object/IRSymtab.cpp SRCS_MIN+= Object/MachOObjectFile.cpp SRCS_MIW+= Object/MachOUniversal.cpp -SRCS_EXT+= Object/MachOUniversalWriter.cpp +SRCS_MIW+= Object/MachOUniversalWriter.cpp SRCS_MIW+= Object/Minidump.cpp SRCS_MIN+= Object/ModuleSymbolTable.cpp SRCS_EXT+= Object/Object.cpp @@ -920,7 +920,7 @@ SRCS_MIN+= Support/Errno.cpp SRCS_MIN+= Support/Error.cpp SRCS_MIN+= Support/ErrorHandling.cpp SRCS_MIN+= Support/FileCollector.cpp -SRCS_EXL+= Support/FileOutputBuffer.cpp +SRCS_MIW+= Support/FileOutputBuffer.cpp SRCS_MIN+= Support/FileUtilities.cpp SRCS_MIN+= Support/FoldingSet.cpp SRCS_MIN+= Support/FormatVariadic.cpp @@ -945,7 +945,7 @@ SRCS_MIN+= Support/MD5.cpp SRCS_MIN+= Support/ManagedStatic.cpp SRCS_MIN+= Support/MathExtras.cpp SRCS_MIN+= Support/MemAlloc.cpp -
git: 24f586182ff4 - main - Enable MK_LLVM_BINUTILS if MK_ASAN is requested
The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=24f586182ff4d0e94a5c17cb542e0bffefb51fa7 commit 24f586182ff4d0e94a5c17cb542e0bffefb51fa7 Author: Alex Richardson AuthorDate: 2021-09-06 09:24:33 + Commit: Alex Richardson CommitDate: 2021-09-06 09:24:34 + Enable MK_LLVM_BINUTILS if MK_ASAN is requested ASan will not be able to provide backtraces with symbol names with elftoolchain's addr2line. To fix this turn MK_LLVM_BINUTILS on by default when ASan instrumentation is requested. Reviewed By:emaste, markj Differential Revision: https://reviews.freebsd.org/D31061 --- share/mk/src.opts.mk | 6 ++ 1 file changed, 6 insertions(+) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 5363cb6e78f9..28e18260affd 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -470,6 +470,12 @@ MK_CLANG_FULL:= no MK_LLVM_COV:= no .endif +.if ${MK_ASAN} == "yes" +# In order to get sensible backtraces from ASAN we have to install +# llvm-symbolizer as /usr/bin/addr2line instead of the elftoolchain version. +MK_LLVM_BINUTILS:= yes +.endif + .if ${MK_LLVM_BINUTILS} == "yes" # MK_LLVM_CXXFILT is a subset of MK_LLVM_BINUTILS and should therefore be # enabled if MK_LLVM_BINUTILS is set. ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: c86a43f1c7db - main - stress2: Added a syzkaller reproducer
The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=c86a43f1c7dbaba4042db017a3c3563f5b826c48 commit c86a43f1c7dbaba4042db017a3c3563f5b826c48 Author: Peter Holm AuthorDate: 2021-09-06 13:32:23 + Commit: Peter Holm CommitDate: 2021-09-06 13:32:23 + stress2: Added a syzkaller reproducer --- tools/test/stress2/misc/all.exclude| 1 + tools/test/stress2/misc/syzkaller43.sh | 327 + 2 files changed, 328 insertions(+) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 9e9226c28574..d4a57af4d559 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -68,6 +68,7 @@ syzkaller39.shWiP 20210607 syzkaller40.sh WiP 20210607 syzkaller41.sh WiP 20210607 syzkaller42.sh WiP 20210613 +syzkaller43.sh WiP 20210906 truss3.sh WiP 20200915 unionfs.sh insmntque: non-locked vp: xx is not exclusive locked... 20130909 unionfs2.shinsmntque: mp-safe fs and non-locked vp is not ... 20111219 diff --git a/tools/test/stress2/misc/syzkaller43.sh b/tools/test/stress2/misc/syzkaller43.sh new file mode 100755 index ..025ee674132d --- /dev/null +++ b/tools/test/stress2/misc/syzkaller43.sh @@ -0,0 +1,327 @@ +#!/bin/sh + +# panic: Assertion done != job_total_nbytes failed at ../../../kern/sys_socket.c:672 +# cpuid = 6 +# time = 1630912129 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe00e4f2fa10 +# vpanic() at vpanic+0x187/frame 0xfe00e4f2fa70 +# panic() at panic+0x43/frame 0xfe00e4f2fad0 +# soaio_process_sb() at soaio_process_sb+0x79a/frame 0xfe00e4f2fb70 +# soaio_kproc_loop() at soaio_kproc_loop+0x96/frame 0xfe00e4f2fbb0 +# fork_exit() at fork_exit+0x80/frame 0xfe00e4f2fbf0 +# fork_trampoline() at fork_trampoline+0xe/frame 0xfe00e4f2fbf0 +# --- trap 0, rip = 0, rsp = 0, rbp = 0 --- +# KDB: enter: panic +# [ thread pid 26 tid 100163 ] +# Stopped at kdb_enter+0x37: movq$0,0x127297e(%rip) +# db> x/s version +# version: FreeBSD 14.0-CURRENT #0 main-n249158-1f7a6325fe1b: Sun Sep 5 09:12:58 CEST 2021 +# p...@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO +# db> + +[ `uname -p` != "amd64" ] && exit 0 +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg +cat > /tmp/syzkaller43.c <https://syzkaller.appspot.com/bug?id=0ecbaedb9a54dd1af01c400dabe774e5c6c6fb6c +// autogenerated by syzkaller (https://github.com/google/syzkaller) +// Reported-by: syzbot+c7d22dbbb9aef5094...@syzkaller.appspotmail.com + +#define _GNU_SOURCE + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void kill_and_wait(int pid, int* status) +{ + kill(pid, SIGKILL); + while (waitpid(-1, status, 0) != pid) { + } +} + +static void sleep_ms(uint64_t ms) +{ + usleep(ms * 1000); +} + +static uint64_t current_time_ms(void) +{ + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts)) +exit(1); + return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 100; +} + +static void thread_start(void* (*fn)(void*), void* arg) +{ + pthread_t th; + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setstacksize(&attr, 128 << 10); + int i = 0; + for (; i < 100; i++) { +if (pthread_create(&th, &attr, fn, arg) == 0) { + pthread_attr_destroy(&attr); + return; +} +if (errno == EAGAIN) { + usleep(50); + continue; +} +break; + } + exit(1); +} + +typedef struct { + pthread_mutex_t mu; + pthread_cond_t cv; + int state; +} event_t; + +static void event_init(event_t* ev) +{ + if (pthread_mutex_init(&ev->mu, 0)) +exit(1); + if (pthread_cond_init(&ev->cv, 0)) +exit(1); + ev->state = 0; +} + +static void event_reset(event_t* ev) +{ + ev->state = 0; +} + +static void event_set(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + if (ev->state) +exit(1); + ev->state = 1; + pthread_mutex_unlock(&ev->mu); + pthread_cond_broadcast(&ev->cv); +} + +static void event_wait(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + while (!ev->state) +pthread_cond_wait(&ev->cv, &ev->mu); + pthread_mutex_unlock(&ev->mu); +} + +static int event_isse
git: efe014e6b177 - main - iconv: Make it possible to build iconv(3) test suite.
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=efe014e6b177ba1b0d70f7df751f5066d4eafe9b commit efe014e6b177ba1b0d70f7df751f5066d4eafe9b Author: Edward Tomasz Napierala AuthorDate: 2021-09-06 14:41:06 + Commit: Edward Tomasz Napierala CommitDate: 2021-09-06 14:41:26 + iconv: Make it possible to build iconv(3) test suite. It was broken after 1243a98e38a5. Reviewed By:allanjude Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31816 --- tools/test/iconv/gnu/gnu.c | 16 tools/test/iconv/posix/posix.c | 16 tools/test/iconv/tablegen/tablegen.c | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tools/test/iconv/gnu/gnu.c b/tools/test/iconv/gnu/gnu.c index 47e83ec3ae3d..ecf180d23b98 100644 --- a/tools/test/iconv/gnu/gnu.c +++ b/tools/test/iconv/gnu/gnu.c @@ -243,8 +243,8 @@ ctl_uc_hook(void) struct iconv_hooks hooks; iconv_t cd; size_t inbytesleft = 15, outbytesleft = 40; - const char **inptr; - const char *s = "Hello World!"; + char **inptr; + char *s = "Hello World!"; char **outptr; char *outbuf; @@ -273,8 +273,8 @@ ctl_wc_hook(void) struct iconv_hooks hooks; iconv_t cd; size_t inbytesleft, outbytesleft = 40; - const char **inptr; - const char *s = "Hello World!"; + char **inptr; + char *s = "Hello World!"; char **outptr; char *outbuf; @@ -350,7 +350,7 @@ ctl_mb_to_uc_fb(void) size_t inbytesleft, outbytesleft; uint16_t inbuf[1] = { 0xF187 }; uint8_t outbuf[4] = { 0x00, 0x00, 0x00, 0x00 }; - const char *inptr; + char *inptr; char *outptr; int ret; @@ -366,7 +366,7 @@ ctl_mb_to_uc_fb(void) if (iconvctl(cd, ICONV_SET_FALLBACKS, (void *)&fb) != 0) return (1); - inptr = (const char *)inbuf; + inptr = (char *)inbuf; outptr = (char *)outbuf; inbytesleft = 2; outbytesleft = 4; @@ -389,7 +389,7 @@ gnu_openinto(void) { iconv_allocation_t *myspace; size_t inbytesleft, outbytesleft; - const char *inptr; + char *inptr; char *inbuf = "works!", *outptr; char outbuf[6]; @@ -398,7 +398,7 @@ gnu_openinto(void) if (iconv_open_into("ASCII", "ASCII", myspace) == -1) return (1); - inptr = (const char *)inbuf; + inptr = (char *)inbuf; outptr = (char *)outbuf; inbytesleft = 6; outbytesleft = 6; diff --git a/tools/test/iconv/posix/posix.c b/tools/test/iconv/posix/posix.c index 2502393b5509..7faed92416a3 100644 --- a/tools/test/iconv/posix/posix.c +++ b/tools/test/iconv/posix/posix.c @@ -108,7 +108,7 @@ conv_ret(void) { iconv_t cd; size_t inbytesleft, outbytesleft; - const char *inptr; + char *inptr; char *outptr; uint32_t outbuf[4]; uint32_t inbuf[2] = { 0x0151, 0x0171 }; @@ -116,7 +116,7 @@ conv_ret(void) if ((cd = iconv_open("ASCII", "UTF-32LE")) == (iconv_t)-1) return (1); - inptr = (const char *)inbuf; + inptr = (char *)inbuf; outptr = (char *)outbuf; inbytesleft = 8; outbytesleft = 16; @@ -129,7 +129,7 @@ conv_2big(void) { iconv_t cd; size_t inbytesleft, outbytesleft; - const char *inptr; + char *inptr; char *outptr; uint32_t inbuf[4]; uint32_t outbuf[2]; @@ -138,7 +138,7 @@ conv_2big(void) if ((cd = iconv_open("ASCII", "ASCII")) == (iconv_t)-1) return (1); - inptr = (const char *)inbuf; + inptr = (char *)inbuf; outptr = (char *)outbuf; inbytesleft = 16; outbytesleft = 8; @@ -168,7 +168,7 @@ conv_einval(void) { iconv_t cd; size_t inbytesleft, outbytesleft; - const char *inptr; + char *inptr; char *outptr; uint32_t outbuf[4]; uint16_t inbuf[1] = { 0xEA42 }; @@ -177,7 +177,7 @@ conv_einval(void) if ((cd = iconv_open("UTF-32", "BIG5")) == (iconv_t)-1) return (1); - inptr = (const char *)inbuf; + inptr = (char *)inbuf; outptr = (char *)outbuf; inbytesleft = 2; outbytesleft = 16; @@ -207,7 +207,7 @@ conv_eilseq(void) { iconv_t cd; size_t inbytesleft, outbytesleft; - const char *inptr; + char *inptr; char *outptr; uint32_t outbuf[4]; uint16_t inbuf[1] = { 0x8AC0 }; @@ -216,7 +216,7 @@ conv_eilseq(void) if ((cd = iconv_open("Latin2", "UTF-16LE")) == (iconv_t)-1) return (1); - inptr = (const char *)inbuf; + inptr = (char *)inbuf; outptr = (char *)outbuf; inbytesleft = 4; outbytesleft = 16; diff --git a/tools/test/iconv/tablegen
git: c6da134591a9 - main - iconv: Fix path names used by iconv(3) tests.
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=c6da134591a9b5de7511e90128d8c20f5bbcc235 commit c6da134591a9b5de7511e90128d8c20f5bbcc235 Author: Edward Tomasz Napierala AuthorDate: 2021-09-06 14:43:24 + Commit: Edward Tomasz Napierala CommitDate: 2021-09-06 14:43:40 + iconv: Fix path names used by iconv(3) tests. Reviewed By:allanjude Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31815 --- tools/test/iconv/Makefile | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/test/iconv/Makefile b/tools/test/iconv/Makefile index bdcec5dab201..3b74be06aac6 100644 --- a/tools/test/iconv/Makefile +++ b/tools/test/iconv/Makefile @@ -29,10 +29,10 @@ ENCODING+= ATARIST BIG5-2003 C99 CP1046 CP1124 CP1125 CP1129 CP1131 CP1133 \ # MACHEBREW .endif -GEN_FWD?= ${.CURDIR}/tablegen/tablegen -t -GEN_REV?= ${.CURDIR}/tablegen/tablegen -tr -REF_FWD?= ${.CURDIR}/refgen/refgen -t -REF_REV?= ${.CURDIR}/refgen/refgen -tr +GEN_FWD?= ${.OBJDIR}/tablegen/tablegen -t +GEN_REV?= ${.OBJDIR}/tablegen/tablegen -tr +REF_FWD?= ${.OBJDIR}/refgen/refgen -t +REF_REV?= ${.OBJDIR}/refgen/refgen -tr CMP?= ${.CURDIR}/tablegen/cmp.sh make-ref: refgen @@ -49,10 +49,10 @@ check: tablegen .for enc in ${ENCODING} @echo "Checking ${enc} --> UTF-32 ..." -@${GEN_FWD} ${enc} >output/${enc} - @${CMP} ref/${enc} output/${enc} + @${CMP} ${.CURDIR}/ref/${enc} ${.OBJDIR}/output/${enc} @echo "Checking UTF-32 --> ${enc} ..." -@${GEN_REV} ${enc} >output/${enc}-rev - @${CMP} ref/${enc}-rev output/${enc}-rev + @${CMP} ${.CURDIR}/ref/${enc}-rev ${.OBJDIR}/output/${enc}-rev .endfor perftest: refgen tablegen @@ -70,10 +70,10 @@ perftest: refgen tablegen .endfor posixtest: posix - @${.CURDIR}/posix/posix + @${.OBJDIR}/posix/posix gnutest: gnu - @${.CURDIR}/gnu/gnu + @${.OBJDIR}/gnu/gnu test-everything: check perftest posixtest gnutest ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 0016b7da3441 - main - iconv: Fix tablegen iconv test utility on arm64
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=0016b7da344191c1960088d2fc41b0cfc3d5b5ec commit 0016b7da344191c1960088d2fc41b0cfc3d5b5ec Author: Edward Tomasz Napierala AuthorDate: 2021-09-06 14:44:59 + Commit: Edward Tomasz Napierala CommitDate: 2021-09-06 14:45:08 + iconv: Fix tablegen iconv test utility on arm64 Previously it would loop indefinitely on getopt_long(3) due to 'char' being unsigned. Reviewed By:allanjude Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31817 --- tools/test/iconv/tablegen/tablegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/iconv/tablegen/tablegen.c b/tools/test/iconv/tablegen/tablegen.c index a67de54ff310..12d44ae753ff 100644 --- a/tools/test/iconv/tablegen/tablegen.c +++ b/tools/test/iconv/tablegen/tablegen.c @@ -200,7 +200,7 @@ main (int argc, char *argv[]) struct iconv_fallbacks fbs; iconv_t cd; char *tocode; - char c; + int c; while (((c = getopt_long(argc, argv, optstr, long_options, NULL)) != -1)) { switch (c) { ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 439aa5872860 - main - iconv: Fix "make make-ref"
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=439aa5872860f5e1d634433161a64f60dacfda7d commit 439aa5872860f5e1d634433161a64f60dacfda7d Author: Edward Tomasz Napierala AuthorDate: 2021-09-06 14:47:30 + Commit: Edward Tomasz Napierala CommitDate: 2021-09-06 14:47:35 + iconv: Fix "make make-ref" The purpose of this command is to "refresh" the source reference files generated with GNU libiconv, located in tools/test/iconv/ref/. Previously it would generate copies somewhere in OBJDIR, which we don't use. Reviewed By:allanjude Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31820 --- tools/test/iconv/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/iconv/Makefile b/tools/test/iconv/Makefile index 3b74be06aac6..6f390d4deb4d 100644 --- a/tools/test/iconv/Makefile +++ b/tools/test/iconv/Makefile @@ -39,9 +39,9 @@ make-ref: refgen mkdir -p ref .for enc in ${ENCODING} @echo "Generating ${enc} --> UTF-32 ..." - -@${REF_FWD} ${enc} >ref/${enc} + -@${REF_FWD} ${enc} >${.CURDIR}/ref/${enc} @echo "Generating UTF-32 --> ${enc} ..." - -@${REF_REV} ${enc} >ref/${enc}-rev + -@${REF_REV} ${enc} >${.CURDIR}/ref/${enc}-rev .endfor check: tablegen ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 8a004a98c2cd - main - git-arc: allow word splitting in build_commit_list()
The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=8a004a98c2cdf4fdbb8f5eaaebc2f89c0919168c commit 8a004a98c2cdf4fdbb8f5eaaebc2f89c0919168c Author: Robert Wing AuthorDate: 2021-09-06 15:42:46 + Commit: Robert Wing CommitDate: 2021-09-06 15:42:46 + git-arc: allow word splitting in build_commit_list() git-rev-list expects commits to be listed separately, allow word splitting and disable shellcheck SC2086 when using git-rev-list to build the commit list. Fixes: 4fd0c6ab1a9e ("Fix most shellcheck warnings in git-arc.sh") Reviewed by:markj Differential Revision: https://reviews.freebsd.org/D31838 --- tools/tools/git/git-arc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 82a549e0868f..0c288e7ac6e2 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -342,7 +342,8 @@ build_commit_list() for chash in "$@"; do _commits=$(git rev-parse "${chash}") if ! git cat-file -e "${chash}"'^{commit}' >/dev/null 2>&1; then -_commits=$(git rev-list "$_commits" | tail -r) +# shellcheck disable=SC2086 +_commits=$(git rev-list $_commits | tail -r) fi [ -n "$_commits" ] || err "invalid commit ID ${chash}" commits="$commits $_commits" ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 292815eac623 - main - Fix powf().
The branch main has been updated by markm: URL: https://cgit.FreeBSD.org/src/commit/?id=292815eac623035493854f133200a4b1041fa246 commit 292815eac623035493854f133200a4b1041fa246 Author: Mark Murray AuthorDate: 2021-09-06 17:26:39 + Commit: Mark Murray CommitDate: 2021-09-06 17:51:31 + Fix powf(). Summary: From Steve Kargl: Paul Zimmermann has identified a bug in Openlibm's powf(), which is identical to FreeBSD's libm. Both derived from fdlibm. https://github.com/JuliaMath/openlibm/issues/212. Consider % cat h.c int main(void) { float x, y, z; x = 0x1.ecp-1F; y = -0x1.02p+27F; z = 0x1.557a86p115F; printf("%e %e %e <-- should be %e\n", x, y, powf(x,y), z); return 0; } % cc -o h -fno-builtin h.c -lm && ./h 9.94e-01 -1.342177e+08 inf <-- should be 5.540807e+34 Reviewers: manu Subscribers: imp, andrew, emaste Differential Revision: https://reviews.freebsd.org/D31865 --- lib/msun/src/e_powf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msun/src/e_powf.c b/lib/msun/src/e_powf.c index 33eedad50b16..122da455f740 100644 --- a/lib/msun/src/e_powf.c +++ b/lib/msun/src/e_powf.c @@ -136,7 +136,7 @@ __ieee754_powf(float x, float y) /* |y| is huge */ if(iy>0x4d00) { /* if |y| > 2**27 */ /* over/underflow if x is not close to one */ - if(ix<0x3f77) return (hy<0)? sn*huge*huge:sn*tiny*tiny; + if(ix<0x3f76) return (hy<0)? sn*huge*huge:sn*tiny*tiny; if(ix>0x3f87) return (hy>0)? sn*huge*huge:sn*tiny*tiny; /* now |1-x| is tiny <= 2**-20, suffice to compute log(x) by x-x^2/2+x^3/3-x^4/4 */ ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: efe67f33c322 - main - compiler-rt: add aarch64 init function for LSE atomics
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=efe67f33c322265eb303ec0ab40275100795b22a commit efe67f33c322265eb303ec0ab40275100795b22a Author: Dimitry Andric AuthorDate: 2021-09-06 19:23:10 + Commit: Dimitry Andric CommitDate: 2021-09-06 19:24:01 + compiler-rt: add aarch64 init function for LSE atomics As reported by Ronald, adding the out-of-line LSE atomics helpers for aarch64 to compiler-rt was not sufficient to link programs using these, as they also require a __aarch64_have_lse_atomics global. This is initialized in compiler-rt's lib/builtins/cpu_model.c, roughly similar to the x86 CPU model and feature detection in that file. Since upstream does not yet have a FreeBSD specific implementation for getting the required information, add a simple one that should work for now, while I try to get it sorted with the LLVM people. Reported by:Ronald Klop Fixes: cc55ee8009a5 PR: 257392 MFC after: 2 weeks --- contrib/llvm-project/compiler-rt/lib/builtins/cpu_model.c | 6 ++ lib/libcompiler_rt/Makefile.inc | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model.c b/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model.c index 51bedd98c3d3..13cfeb05dcb8 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model.c @@ -775,8 +775,14 @@ _Bool __aarch64_have_lse_atomics #define HWCAP_ATOMICS (1 << 8) #endif static void CONSTRUCTOR_ATTRIBUTE init_have_lse_atomics(void) { +#if defined(__FreeBSD__) + unsigned long hwcap; + int result = elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap); + __aarch64_have_lse_atomics = result == 0 && (hwcap & HWCAP_ATOMICS) != 0; +#else unsigned long hwcap = getauxval(AT_HWCAP); __aarch64_have_lse_atomics = (hwcap & HWCAP_ATOMICS) != 0; +#endif } #endif // defined(__has_include) #endif // __has_include() diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index aa0a6a6c9e69..06d662e38d82 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -146,8 +146,9 @@ SRCF+= floatundisf SRCF+= floatundixf .endif -# __cpu_model support, only used on x86 -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +# __cpu_model support, only used on aarch64 and x86 +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ +${MACHINE_CPUARCH} == "i386" SRCF+= cpu_model .endif ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 936f4a42fa2a - main - lltable: do not require prefix lookup when checking lle allocation rules.
The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=936f4a42fa2a23d21f8f14a8c33627a8207b4b3b commit 936f4a42fa2a23d21f8f14a8c33627a8207b4b3b Author: Alexander V. Chernikov AuthorDate: 2021-09-03 11:48:36 + Commit: Alexander V. Chernikov CommitDate: 2021-09-06 21:03:22 + lltable: do not require prefix lookup when checking lle allocation rules. With the new FIB_ALGO infrastructure, nearly all subsystems use fib[46]_lookup() functions, which provides lockless lookups. A number of places remains that uses old-style lookup functions, that still requires RIB read lock to return the result. One of such places is arp processing code. FIB_ALGO implementation makes some tradeoffs, resulting in (relatively) prolonged periods of holding RIB_WLOCK. If the lock is held and datapath competes for it, the RX ring may get blocked, ending in traffic delays and losses. As currently arp processing is performed directly in the interrupt handler, handling ARP replies triggers the problem descibed above when the amount of ARP replies is high. To be more specific, prior to creating new ARP entry, routing lookup for the entry address in interface fib is executed. The following conditions are the verified: 1. If lookup returns an empty result, or the resulting prefix is non-directly-reachable, failure is returned. The only exception are host routes w/ gateway==address. 2. If the routing lookup returns different interface and non-host route, we want to support the use case of having multiple interfaces with the same prefix. In fact, the current code just checks if the returned prefix covers target address (always true) and effectively allow allocating ARP entries for any directly-reachable prefix, regardless of its interface. Change the code to perform the following: 1) use fib4_lookup() to get the nexthop, instead of requesting exact prefix. 2) Rewrite first condition check using nexthop flags (1:1 match) 3) Rewrite second condition to check for interface addresses matching target address on the input interface. Differential Revision: https://reviews.freebsd.org/D31824 Reviewed by:ae MFC after: 1 week PR: 257965 --- sys/netinet/in.c | 73 ++-- 1 file changed, 23 insertions(+), 50 deletions(-) diff --git a/sys/netinet/in.c b/sys/netinet/in.c index f9b46b414007..ce03c0b6d4cb 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1358,48 +1359,32 @@ in_lltable_free_entry(struct lltable *llt, struct llentry *lle) static int in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr) { - struct rt_addrinfo info; - struct sockaddr_in rt_key, rt_mask; - struct sockaddr rt_gateway; - int rt_flags; + struct nhop_object *nh; + struct in_addr addr; KASSERT(l3addr->sa_family == AF_INET, ("sin_family %d", l3addr->sa_family)); - bzero(&rt_key, sizeof(rt_key)); - rt_key.sin_len = sizeof(rt_key); - bzero(&rt_mask, sizeof(rt_mask)); - rt_mask.sin_len = sizeof(rt_mask); - bzero(&rt_gateway, sizeof(rt_gateway)); - rt_gateway.sa_len = sizeof(rt_gateway); + addr = ((const struct sockaddr_in *)l3addr)->sin_addr; - bzero(&info, sizeof(info)); - info.rti_info[RTAX_DST] = (struct sockaddr *)&rt_key; - info.rti_info[RTAX_NETMASK] = (struct sockaddr *)&rt_mask; - info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&rt_gateway; - - if (rib_lookup_info(ifp->if_fib, l3addr, NHR_REF, 0, &info) != 0) + nh = fib4_lookup(ifp->if_fib, addr, 0, NHR_NONE, 0); + if (nh == NULL) return (EINVAL); - rt_flags = info.rti_flags; - /* * If the gateway for an existing host route matches the target L3 * address, which is a special route inserted by some implementation * such as MANET, and the interface is of the correct type, then * allow for ARP to proceed. */ - if (rt_flags & RTF_GATEWAY) { - if (!(rt_flags & RTF_HOST) || !info.rti_ifp || - info.rti_ifp->if_type != IFT_ETHER || - (info.rti_ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0 || - memcmp(rt_gateway.sa_data, l3addr->sa_data, + if (nh->nh_flags & NHF_GATEWAY) { + if (!(nh->nh_flags & NHF_HOST) || nh->nh_ifp->if_type != IFT_ETHER || + (nh->nh_ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0 || + memcmp(nh->gw_sa.sa_data, l3addr->sa_data, sizeof(in_addr_t)) != 0) { - rib_free_info(&info);
git: 98168a6e6c12 - main - kqueue: drain kqueue taskqueue if syscall tickled it
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=98168a6e6c12dab8f608f6b5f5b0b175d2b87ef0 commit 98168a6e6c12dab8f608f6b5f5b0b175d2b87ef0 Author: Konstantin Belousov AuthorDate: 2021-09-06 11:43:06 + Commit: Konstantin Belousov CommitDate: 2021-09-06 23:43:34 + kqueue: drain kqueue taskqueue if syscall tickled it Otherwise return from the syscall and next syscall, which could be kevent(2) on the kqueue that should be notified, races with the kqueue taskqueue thread, and potentially misses the wakeup. This is reliably visible when kevent(2) only peeks into events using zeroed timeout. PR: 258310 Reported by:arichardson, Jan Kokemüller Reviewed by:arichardson, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31858 --- sys/kern/kern_event.c | 11 +++ sys/kern/subr_trap.c | 7 ++- sys/sys/event.h | 1 + sys/sys/proc.h| 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 859248569f76..db505b234268 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1768,9 +1768,16 @@ kqueue_release(struct kqueue *kq, int locked) KQ_UNLOCK(kq); } +void +kqueue_drain_schedtask(void) +{ + taskqueue_quiesce(taskqueue_kqueue_ctx); +} + static void kqueue_schedtask(struct kqueue *kq) { + struct thread *td; KQ_OWNED(kq); KASSERT(((kq->kq_state & KQ_TASKDRAIN) != KQ_TASKDRAIN), @@ -1779,6 +1786,10 @@ kqueue_schedtask(struct kqueue *kq) if ((kq->kq_state & KQ_TASKSCHED) != KQ_TASKSCHED) { taskqueue_enqueue(taskqueue_kqueue_ctx, &kq->kq_task); kq->kq_state |= KQ_TASKSCHED; + td = curthread; + thread_lock(td); + td->td_flags |= TDF_ASTPENDING | TDF_KQTICKLED; + thread_unlock(td); } } diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index edeeded09911..2b86fe75776f 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -241,7 +242,8 @@ ast(struct trapframe *framep) thread_lock(td); flags = td->td_flags; td->td_flags &= ~(TDF_ASTPENDING | TDF_NEEDSIGCHK | TDF_NEEDSUSPCHK | - TDF_NEEDRESCHED | TDF_ALRMPEND | TDF_PROFPEND | TDF_MACPEND); + TDF_NEEDRESCHED | TDF_ALRMPEND | TDF_PROFPEND | TDF_MACPEND | + TDF_KQTICKLED); thread_unlock(td); VM_CNT_INC(v_trap); @@ -343,6 +345,9 @@ ast(struct trapframe *framep) resched_sigs = false; } + if ((flags & TDF_KQTICKLED) != 0) + kqueue_drain_schedtask(); + /* * Handle deferred update of the fast sigblock value, after * the postsig() loop was performed. diff --git a/sys/sys/event.h b/sys/sys/event.h index cf7db43475fd..80ed1268c8a1 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -349,6 +349,7 @@ int kqfd_register(int fd, struct kevent *kev, struct thread *p, int mflag); intkqueue_add_filteropts(int filt, struct filterops *filtops); intkqueue_del_filteropts(int filt); +void kqueue_drain_schedtask(void); #else /* !_KERNEL */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 39ff1d95f80b..ddc8392481aa 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -451,7 +451,7 @@ do { \ #defineTDF_ALLPROCSUSP 0x0200 /* suspended by SINGLE_ALLPROC */ #defineTDF_BOUNDARY0x0400 /* Thread suspended at user boundary */ #defineTDF_ASTPENDING 0x0800 /* Thread has some asynchronous events. */ -#defineTDF_UNUSED120x1000 /* --available-- */ +#defineTDF_KQTICKLED 0x1000 /* AST drain kqueue taskqueue */ #defineTDF_SBDRY 0x2000 /* Stop only on usermode boundary. */ #defineTDF_UPIBLOCKED 0x4000 /* Thread blocked on user PI mutex. */ #defineTDF_NEEDSUSPCHK 0x8000 /* Thread may need to suspend. */ ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 7165504a1768 - main - ixgbe: clear all queues on VF reset
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7165504a17682dc8c96d44c65319bf73c89f7f10 commit 7165504a17682dc8c96d44c65319bf73c89f7f10 Author: Simon Ellmann AuthorDate: 2020-12-17 17:14:52 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:11 + ixgbe: clear all queues on VF reset ixgbe devices support up to 8 Rx and Tx queues per virtual function. Currently, the registers of only seven queues are set to default when resetting a VF. Signed-off-by: Simon Ellmann Acked-by: Haiyue Wang Approved by:imp Obtained from: DPDK (d2565b347915def3a0f3c68bde6824acf096a0e6) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_vf.c b/sys/dev/ixgbe/ixgbe_vf.c index 5dfd28f7bf4f..e692f12ebb0d 100644 --- a/sys/dev/ixgbe/ixgbe_vf.c +++ b/sys/dev/ixgbe/ixgbe_vf.c @@ -117,7 +117,7 @@ static void ixgbe_virt_clr_reg(struct ixgbe_hw *hw) IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE, 0); - for (i = 0; i < 7; i++) { + for (i = 0; i < 8; i++) { IXGBE_WRITE_REG(hw, IXGBE_VFRDH(i), 0); IXGBE_WRITE_REG(hw, IXGBE_VFRDT(i), 0); IXGBE_WRITE_REG(hw, IXGBE_VFRXDCTL(i), 0); ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 8270b7174c48 - main - ixgbe: fix infinite recursion on PCIe link down
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8270b7174c48417a4d5f3effa4a4f4588205e687 commit 8270b7174c48417a4d5f3effa4a4f4588205e687 Author: Guinan Sun AuthorDate: 2020-07-09 08:00:31 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:11 + ixgbe: fix infinite recursion on PCIe link down In some corner cases the functions ixgbe_clear_rar_generic and ixgbe_clear_vmdq_generic may call one another leading to infinite recursion. When ixgbe_clear_vmdq_generic is called with IXGBE_CLEAR_VMDQ_ALL flag, it's going to clear MPSAR registers, and proceed to call ixgbe_clear_rar_generic, which in turn will clear the RAR registers, and recursively call back ixgbe_clear_vmdq_generic. Normally, the latter would detect that MPSAR registers have already been cleared and terminate the recursion. However, when PCIe link is down, and before the driver has had the opportunity to shut itself down, all register reads return 0x, and all register writes fail silently. In such case, because ixgbe_clear_vmdq_generic blindly assumes that clearing MPSAR registers succeeded, it's going to always call ixgbe_clear_rar_generic, which in turn will always call back ixgbe_clear_vmdq_generic, creating infinite recursion. This patch re-reads MPSAR register values after they had been cleared. In case of PCIe link failure, the values read will be non-zero, which will terminate the recursion. On the other hand, under normal circumstances the value read from MPSAR registers is going to be equal to the value previously written, so this patch is expected not to cause any regressions. Signed-off-by: Robert Konklewski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (2d04b9e856125197ec8e967471426d56ab7efcf0) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index d7da9f81fbf8..92db7c14da45 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -3813,11 +3813,11 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq) if (vmdq == IXGBE_CLEAR_VMDQ_ALL) { if (mpsar_lo) { IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0); - mpsar_lo = 0; + mpsar_lo = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar)); } if (mpsar_hi) { IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0); - mpsar_hi = 0; + mpsar_hi = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar)); } } else if (vmdq < 32) { mpsar_lo &= ~(1 << vmdq); ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: c966c431c764 - main - ixgbe: fix response to apply-update command
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c966c431c764c493fafbe65b717243a3c0b291be commit c966c431c764c493fafbe65b717243a3c0b291be Author: Guinan Sun AuthorDate: 2020-07-09 08:00:29 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:11 + ixgbe: fix response to apply-update command For the "Apply Update" command the firmware does not given an response. For this command, success should be return. Signed-off-by: Mateusz Kowalski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (03b09c71c0c6c516ce05cad8e8aa75e8b9e14fba) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_common.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 34c0f128aae4..6ee71dec4fda 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -4557,11 +4557,18 @@ s32 ixgbe_hic_unlocked(struct ixgbe_hw *hw, u32 *buffer, u32 length, msec_delay(1); } + /* For each command except "Apply Update" perform +* status checks in the HICR registry. +*/ + if ((buffer[0] & IXGBE_HOST_INTERFACE_MASK_CMD) == + IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD) + return IXGBE_SUCCESS; + /* Check command completion */ if ((timeout && i == timeout) || !(IXGBE_READ_REG(hw, IXGBE_HICR) & IXGBE_HICR_SV)) { ERROR_REPORT1(IXGBE_ERROR_CAUTION, -"Command has failed with no status valid.\n"); + "Command has failed with no status valid.\n"); return IXGBE_ERR_HOST_INTERFACE_COMMAND; } ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: c4f73d5d6a6c - main - ixgbe: add IPv6 mask for flow director
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c4f73d5d6a6c0117e08a03920cce69202865ba13 commit c4f73d5d6a6c0117e08a03920cce69202865ba13 Author: Guinan Sun AuthorDate: 2020-07-09 08:00:42 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:11 + ixgbe: add IPv6 mask for flow director Write FDIRIP6M register to allow flow director filter to set ipv6 rules without setting ipv6 source/destination address. Signed-off-by: Piotr Skajewski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (21feefa2fcd5899ee26a10be405c17c0a1109860) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_82599.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index e92fb1292da2..15febd08352e 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -1868,6 +1868,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw, ~input_mask->formatted.src_ip[0]); IXGBE_WRITE_REG_BE32(hw, IXGBE_FDIRDIP4M, ~input_mask->formatted.dst_ip[0]); + IXGBE_WRITE_REG_BE32(hw, IXGBE_FDIRIP6M, 0x); } return IXGBE_SUCCESS; } ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: f511cd22586a - main - ixgbe: improve log about autoneg being disabled
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f511cd22586a9c0358b86334a51e3db60ca2db01 commit f511cd22586a9c0358b86334a51e3db60ca2db01 Author: Guinan Sun AuthorDate: 2020-07-09 08:00:41 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:11 + ixgbe: improve log about autoneg being disabled On ESXi OS, when user disables auto negotiation, the following log appears: "(unsupported) Flow control autoneg is disabled". It is true that auto negotiation is disabled but it is not necessarily true that it is not supported. Signed-off-by: Jakub Chylkowski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (ab6ac48d483ef7f906b90f45182f2ddf3254d876) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 92db7c14da45..34c0f128aae4 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -3118,8 +3118,9 @@ void ixgbe_fc_autoneg(struct ixgbe_hw *hw) * - link is not up. */ if (hw->fc.disable_fc_autoneg) { - ERROR_REPORT1(IXGBE_ERROR_UNSUPPORTED, -"Flow control autoneg is disabled"); + /* TODO: This should be just an informative log */ + ERROR_REPORT1(IXGBE_ERROR_CAUTION, + "Flow control autoneg is disabled"); goto out; } ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 31a23e3eb531 - main - ixgbe: fix host interface shadow RAM read
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=31a23e3eb5314a6b5929e980a0810803adfaad1f commit 31a23e3eb5314a6b5929e980a0810803adfaad1f Author: Guinan Sun AuthorDate: 2020-07-09 08:00:28 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:11 + ixgbe: fix host interface shadow RAM read Host interface Shadow RAM Read (0x31) command response buffer length should be stored in two bytes, instead of one byte. This patch fixes it. Signed-off-by: Mateusz Kowalski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (713fc4dd340e5eadd3bfa9a468446afaa5188624) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_common.c | 3 ++- sys/dev/ixgbe/ixgbe_type.h | 22 ++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 6ee71dec4fda..2b9f8a0ca110 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -4636,7 +4636,8 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer, * Read Flash command requires reading buffer length from * two byes instead of one byte */ - if (resp->cmd == 0x30) { + if (resp->cmd == IXGBE_HOST_INTERFACE_FLASH_READ_CMD || + resp->cmd == IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD) { for (; bi < dword_len + 2; bi++) { buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi); diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index 1d00eadc890a..9619b771ea89 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -2426,6 +2426,16 @@ enum { #define IXGBE_FW_LESM_PARAMETERS_PTR 0x2 #define IXGBE_FW_LESM_STATE_1 0x1 #define IXGBE_FW_LESM_STATE_ENABLED0x8000 /* LESM Enable bit */ +#define IXGBE_FW_LESM_2_STATES_ENABLED_MASK0x1F +#define IXGBE_FW_LESM_2_STATES_ENABLED 0x12 +#define IXGBE_FW_LESM_STATE0_10G_ENABLED 0x6FFF +#define IXGBE_FW_LESM_STATE1_10G_ENABLED 0x4FFF +#define IXGBE_FW_LESM_STATE0_10G_DISABLED 0x0FFF +#define IXGBE_FW_LESM_STATE1_10G_DISABLED 0x2FFF +#define IXGBE_FW_LESM_PORT0_STATE0_OFFSET 0x2 +#define IXGBE_FW_LESM_PORT0_STATE1_OFFSET 0x3 +#define IXGBE_FW_LESM_PORT1_STATE0_OFFSET 0x6 +#define IXGBE_FW_LESM_PORT1_STATE1_OFFSET 0x7 #define IXGBE_FW_PASSTHROUGH_PATCH_CONFIG_PTR 0x4 #define IXGBE_FW_PATCH_VERSION_4 0x7 #define IXGBE_FCOE_IBA_CAPS_BLK_PTR0x33 /* iSCSI/FCOE block */ @@ -4427,6 +4437,18 @@ struct ixgbe_bypass_eeprom { #define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD \ (0x1F << IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT) +/* Code Command (Flash I/F Interface) */ +#define IXGBE_HOST_INTERFACE_FLASH_READ_CMD0x30 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD 0x31 +#define IXGBE_HOST_INTERFACE_FLASH_WRITE_CMD 0x32 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_WRITE_CMD 0x33 +#define IXGBE_HOST_INTERFACE_FLASH_MODULE_UPDATE_CMD 0x34 +#define IXGBE_HOST_INTERFACE_FLASH_BLOCK_EREASE_CMD0x35 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_DUMP_CMD 0x36 +#define IXGBE_HOST_INTERFACE_FLASH_INFO_CMD0x37 +#define IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD 0x38 +#define IXGBE_HOST_INTERFACE_MASK_CMD 0x00FF + #define IXGBE_REQUEST_TASK_MOD 0x01 #define IXGBE_REQUEST_TASK_MSF 0x02 #define IXGBE_REQUEST_TASK_MBX 0x04 ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 8e9f1b239dc0 - main - ixgbe: fix x550em 10G NIC link status
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8e9f1b239dc00a2375af87c48321f85a1e37c14e commit 8e9f1b239dc00a2375af87c48321f85a1e37c14e Author: Guinan Sun AuthorDate: 2020-07-09 08:00:30 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:12 + ixgbe: fix x550em 10G NIC link status With the NVM image for x550em XFI will not report the auto-negotiation feature correctly. The auto-negotiation should be "No" for supports and advertised items. At the same time update speed makes it support 1G and 10G. Signed-off-by: Piotr Skajewski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (fb03b51da940f1d56d701776fd85a0dfc1ace098) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_x550.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 868b5cdc2e70..03904c026cae 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -1912,7 +1912,14 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, else *speed = IXGBE_LINK_SPEED_10GB_FULL; } else { + *autoneg = true; + switch (hw->phy.type) { + case ixgbe_phy_x550em_xfi: + *speed = IXGBE_LINK_SPEED_1GB_FULL | +IXGBE_LINK_SPEED_10GB_FULL; + *autoneg = false; + break; case ixgbe_phy_ext_1g_t: case ixgbe_phy_sgmii: *speed = IXGBE_LINK_SPEED_1GB_FULL; @@ -1936,7 +1943,6 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, IXGBE_LINK_SPEED_1GB_FULL; break; } - *autoneg = TRUE; } return IXGBE_SUCCESS; ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: aaa3af802f90 - main - ixgbe: wait longer for link after fiber MAC setup
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=aaa3af802f90d93fdffb99100fe56f0bc3dda119 commit aaa3af802f90d93fdffb99100fe56f0bc3dda119 Author: Matthew Smith AuthorDate: 2018-07-16 16:36:04 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:12 + ixgbe: wait longer for link after fiber MAC setup After setting up the link on a fiber port, the maximum wait time for the link to come up is 500 ms in ixgbe_setup_mac_link_multispeed_fiber(). On an x550 SFP+ port, this is often not sufficiently long for the link to come up. This can result in never being able to retrieve accurate link status for the port using rte_eth_link_get_nowait(). Increase the maximum wait time in ixgbe_setup_mac_link_multispeed_fiber() to 1 s. Signed-off-by: Matthew Smith Acked-by: Qi Zhang Approved by:imp Obtained from: DPDK (64f1c8539c8ce99214b9eb1fb728a2c6745f3300) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 2b9f8a0ca110..fdb371637d8c 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -5380,7 +5380,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, * Section 73.10.2, we may have to wait up to 500ms if KR is * attempted. 82599 uses the same timing for 10g SFI. */ - for (i = 0; i < 5; i++) { + for (i = 0; i < 10; i++) { /* Wait for the link partner to also set speed */ msec_delay(100); ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 96ef6eb3ae9d - main - ixgbe: fix maximum wait time in comment
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=96ef6eb3ae9d622906fb838c82ede3074f864cdc commit 96ef6eb3ae9d622906fb838c82ede3074f864cdc Author: Xiaolong Ye AuthorDate: 2018-11-15 07:20:05 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:12 + ixgbe: fix maximum wait time in comment As the code has changed the max wait time to 1000ms, the comment should be changed accordingly. Signed-off-by: Xiaolong Ye Acked-by: Qi Zhang Approved by:imp Obtained from: DPDK (73247f1ced303c16987bb366d38a2d8a0fc40db4) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index fdb371637d8c..7f32c112f74c 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -5377,7 +5377,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, ixgbe_flap_tx_laser(hw); /* Wait for the controller to acquire link. Per IEEE 802.3ap, -* Section 73.10.2, we may have to wait up to 500ms if KR is +* Section 73.10.2, we may have to wait up to 1000ms if KR is * attempted. 82599 uses the same timing for 10g SFI. */ for (i = 0; i < 10; i++) { ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: b3ebe337ffa0 - main - ixgbe: initialize data field in struct buffer
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b3ebe337ffa06b0f1f460bf8f1e42fb55db77d0b commit b3ebe337ffa06b0f1f460bf8f1e42fb55db77d0b Author: Guinan Sun AuthorDate: 2020-07-09 08:00:40 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:12 + ixgbe: initialize data field in struct buffer While sending request using ixgbe_hic_unlocked() the data field in buffer struct is not used. It is set when the struct is overwritten by FW to deliver the response. To not pass random data to FW the whole structure should be zeroed before use. Signed-off-by: Krzysztof Galazka Signed-off-by: Piotr Pietruszewski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (40543be5376ca415b2a7e196315d0555725b8bdf) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 03904c026cae..02db10b61673 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -3137,6 +3137,7 @@ s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data) /* one word */ buffer.length = IXGBE_CPU_TO_BE16(sizeof(u16)); buffer.pad2 = 0; + buffer.data = 0; buffer.pad3 = 0; status = hw->mac.ops.acquire_swfw_sync(hw, mask); @@ -3197,6 +3198,7 @@ s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, buffer.address = IXGBE_CPU_TO_BE32((offset + current_word) * 2); buffer.length = IXGBE_CPU_TO_BE16(words_to_read * 2); buffer.pad2 = 0; + buffer.data = 0; buffer.pad3 = 0; status = ixgbe_hic_unlocked(hw, (u32 *)&buffer, sizeof(buffer), ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: c85b6f2901e7 - main - ixgbe: replace an operation in X550 setup
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c85b6f2901e7804105ca1d6d41cc5eb9a60474b8 commit c85b6f2901e7804105ca1d6d41cc5eb9a60474b8 Author: Xiaoyun Li AuthorDate: 2018-09-17 09:28:11 + Commit: Kevin Bowling CommitDate: 2021-09-07 03:01:35 + ixgbe: replace an operation in X550 setup Replace "=" operation with "|=" operation to only set the intended register bits. Signed-off-by: Xiaoyun Li Acked-by: Qi Zhang Approved by:imp Obtained from: DPDK (1b665ccd9cd73499e934b807bec2fd77193912ef) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_x550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index bcfbe14b30d2..b5f1bc4f6ef8 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -2802,9 +2802,9 @@ s32 ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, (IXGBE_CS4227_EDC_MODE_SR << 1)); if (setup_linear) - reg_phy_ext = (IXGBE_CS4227_EDC_MODE_CX1 << 1) | 0x1; + reg_phy_ext |= (IXGBE_CS4227_EDC_MODE_CX1 << 1) | 0x1; else - reg_phy_ext = (IXGBE_CS4227_EDC_MODE_SR << 1) | 0x1; + reg_phy_ext |= (IXGBE_CS4227_EDC_MODE_SR << 1) | 0x1; ret_val = hw->phy.ops.write_reg(hw, reg_slice, IXGBE_MDIO_ZERO_DEV_TYPE, reg_phy_ext); ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: c1a56b6f5ffd - main - ixgbe: check host interface return status
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c1a56b6f5ffd6f3180a654d058c1783ccb808e8b commit c1a56b6f5ffd6f3180a654d058c1783ccb808e8b Author: Guinan Sun AuthorDate: 2020-07-09 08:00:44 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:12 + ixgbe: check host interface return status Writing to read-only fields returns a non-OK Return Status for shadow RAM write command for X550. This information was previously discarded. Signed-off-by: Stanislaw Grzeszczak Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (db18e37090a3b9af47d6a6886248520f6b220bf9) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_x550.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 02db10b61673..7b120f841d85 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -3259,7 +3259,18 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, status = ixgbe_host_interface_command(hw, (u32 *)&buffer, sizeof(buffer), - IXGBE_HI_COMMAND_TIMEOUT, FALSE); + IXGBE_HI_COMMAND_TIMEOUT, TRUE); + if (status != IXGBE_SUCCESS) { + DEBUGOUT2("for offset %04x failed with status %d\n", + offset, status); + return status; + } + + if (buffer.hdr.rsp.buf_lenh_status != FW_CEM_RESP_STATUS_SUCCESS) { + DEBUGOUT2("for offset %04x host interface return status %02x\n", + offset, buffer.hdr.rsp.buf_lenh_status); + return IXGBE_ERR_HOST_INTERFACE_COMMAND; + } return status; } ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: d5bbb5500cf2 - main - ixgbe: wait for link after copper MAC setup
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d5bbb5500cf2ebeae078cb6ae38ecd4b15ec7f6d commit d5bbb5500cf2ebeae078cb6ae38ecd4b15ec7f6d Author: Ashijeet Acharya AuthorDate: 2019-05-24 09:30:15 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:22:13 + ixgbe: wait for link after copper MAC setup After setting up the link on x552/X557-AT 10GBASE-T NICs, sometimes the link does not get set up properly and as a result all the subsequent calls to ixgbe_check_link() from ixgbe_dev_link_update_share() fail. Introduce a delay time of 1s in ixgbe_setup_mac_link_t_X550em() before beginning to set up the external PHY link speed to ensure that the controller can acquire the link. Signed-off-by: Ashijeet Acharya Acked-by: Qi Zhang Approved by:imp Obtained from: DPDK (d31b95860d8e9dd7c6e242bd08baaac00a9714f0) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_x550.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 7b120f841d85..a7759117f5b5 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -4464,6 +4464,8 @@ s32 ixgbe_setup_mac_link_t_X550em(struct ixgbe_hw *hw, { s32 status; ixgbe_link_speed force_speed; + u32 i; + bool link_up = false; DEBUGFUNC("ixgbe_setup_mac_link_t_X550em"); @@ -4483,6 +4485,19 @@ s32 ixgbe_setup_mac_link_t_X550em(struct ixgbe_hw *hw, if (status != IXGBE_SUCCESS) return status; + + /* Wait for the controller to acquire link */ + for (i = 0; i < 10; i++) { + msec_delay(100); + + status = ixgbe_check_link(hw, &force_speed, &link_up, + false); + if (status != IXGBE_SUCCESS) + return status; + + if (link_up) + break; + } } return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait_to_complete); ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 994dd6328c66 - main - ixgbe: add typecast for type mismatch
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=994dd6328c66fc277438ad51ed074f3c52096147 commit 994dd6328c66fc277438ad51ed074f3c52096147 Author: Guinan Sun AuthorDate: 2020-07-09 08:00:37 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:30:05 + ixgbe: add typecast for type mismatch Add typecast for type mismatch. Signed-off-by: Jakub Chylkowski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (d8e52b2cf771c31b523b46852fd86225b5a2c721) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_82599.c | 8 sys/dev/ixgbe/ixgbe_common.c| 2 +- sys/dev/ixgbe/ixgbe_dcb_82598.c | 2 +- sys/dev/ixgbe/ixgbe_dcb_82599.c | 2 +- sys/dev/ixgbe/ixgbe_x550.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 15febd08352e..1f81f6109f1b 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -1583,7 +1583,7 @@ void ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw, * is for FDIRCMD. Then do a 64-bit register write from FDIRHASH. */ fdirhashcmd = (u64)fdircmd << 32; - fdirhashcmd |= ixgbe_atr_compute_sig_hash_82599(input, common); + fdirhashcmd |= (u64)ixgbe_atr_compute_sig_hash_82599(input, common); IXGBE_WRITE_REG64(hw, IXGBE_FDIRHASH, fdirhashcmd); DEBUGOUT2("Tx Queue=%x hash=%x\n", queue, (u32)fdirhashcmd); @@ -1672,7 +1672,7 @@ static u32 ixgbe_get_fdirtcpm_82599(union ixgbe_atr_input *input_mask) { u32 mask = IXGBE_NTOHS(input_mask->formatted.dst_port); mask <<= IXGBE_FDIRTCPM_DPORTM_SHIFT; - mask |= IXGBE_NTOHS(input_mask->formatted.src_port); + mask |= (u32)IXGBE_NTOHS(input_mask->formatted.src_port); mask = ((mask & 0x) << 1) | ((mask & 0x) >> 1); mask = ((mask & 0x) << 2) | ((mask & 0x) >> 2); mask = ((mask & 0x0F0F0F0F) << 4) | ((mask & 0xF0F0F0F0) >> 4); @@ -1905,14 +1905,14 @@ s32 ixgbe_fdir_write_perfect_filter_82599(struct ixgbe_hw *hw, /* record source and destination port (little-endian)*/ fdirport = IXGBE_NTOHS(input->formatted.dst_port); fdirport <<= IXGBE_FDIRPORT_DESTINATION_SHIFT; - fdirport |= IXGBE_NTOHS(input->formatted.src_port); + fdirport |= (u32)IXGBE_NTOHS(input->formatted.src_port); IXGBE_WRITE_REG(hw, IXGBE_FDIRPORT, fdirport); } /* record VLAN (little-endian) and flex_bytes(big-endian) */ fdirvlan = IXGBE_STORE_AS_BE16(input->formatted.flex_bytes); fdirvlan <<= IXGBE_FDIRVLAN_FLEX_SHIFT; - fdirvlan |= IXGBE_NTOHS(input->formatted.vlan_id); + fdirvlan |= (u32)IXGBE_NTOHS(input->formatted.vlan_id); IXGBE_WRITE_REG(hw, IXGBE_FDIRVLAN, fdirvlan); if (cloud_mode) { diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 7f32c112f74c..573f7684e959 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -774,7 +774,7 @@ s32 ixgbe_read_pba_num_generic(struct ixgbe_hw *hw, u32 *pba_num) DEBUGOUT("NVM Read Error\n"); return ret_val; } - *pba_num |= data; + *pba_num |= (u32)data; return IXGBE_SUCCESS; } diff --git a/sys/dev/ixgbe/ixgbe_dcb_82598.c b/sys/dev/ixgbe/ixgbe_dcb_82598.c index 0845ba872a1d..37744462bc07 100644 --- a/sys/dev/ixgbe/ixgbe_dcb_82598.c +++ b/sys/dev/ixgbe/ixgbe_dcb_82598.c @@ -198,7 +198,7 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_82598(struct ixgbe_hw *hw, for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) { max_credits = max[i]; reg = max_credits << IXGBE_TDTQ2TCCR_MCL_SHIFT; - reg |= refill[i]; + reg |= (u32)(refill[i]); reg |= (u32)(bwg_id[i]) << IXGBE_TDTQ2TCCR_BWG_SHIFT; if (tsa[i] == ixgbe_dcb_tsa_group_strict_cee) diff --git a/sys/dev/ixgbe/ixgbe_dcb_82599.c b/sys/dev/ixgbe/ixgbe_dcb_82599.c index 4799fe1d943a..3056cbf5c2f3 100644 --- a/sys/dev/ixgbe/ixgbe_dcb_82599.c +++ b/sys/dev/ixgbe/ixgbe_dcb_82599.c @@ -197,7 +197,7 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_82599(struct ixgbe_hw *hw, u16 *refill, for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) { max_credits = max[i]; reg = max_credits << IXGBE_RTTDT2C_MCL_SHIFT; - reg |= refill[i]; + reg |= (u32)(refill[i]); reg |= (u32)(bwg_id[i]) << IXGBE_RTTDT2C_BWG_SHIFT; if (tsa[i] == ixgbe_dcb_tsa_group_strict_cee) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index a7759117f5b5..6edeeb178289 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev
git: b622bdb4ebdf - main - ixgbe: add FW recovery mode check
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b622bdb4ebdfc6dfe1a332fcc912426559c829f3 commit b622bdb4ebdfc6dfe1a332fcc912426559c829f3 Author: Xiaoyun Li AuthorDate: 2018-09-17 09:28:10 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:40:59 + ixgbe: add FW recovery mode check Add FM NVM recovery mode check. Allow the software to detect this. Signed-off-by: Xiaoyun Li Acked-by: Qi Zhang Approved by:imp Obtained from: DPDK (5fb0a9acbb844b21691568c0014866e0e887bd19) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_api.c | 12 sys/dev/ixgbe/ixgbe_api.h | 1 + sys/dev/ixgbe/ixgbe_type.h | 4 sys/dev/ixgbe/ixgbe_x550.c | 16 sys/dev/ixgbe/ixgbe_x550.h | 1 + 5 files changed, 34 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_api.c b/sys/dev/ixgbe/ixgbe_api.c index c71afcb0df67..5e662dac93f9 100644 --- a/sys/dev/ixgbe/ixgbe_api.c +++ b/sys/dev/ixgbe/ixgbe_api.c @@ -1306,6 +1306,18 @@ void ixgbe_restore_mdd_vf(struct ixgbe_hw *hw, u32 vf) hw->mac.ops.restore_mdd_vf(hw, vf); } +/** + * ixgbe_fw_recovery_mode - Check if in FW NVM recovery mode + * @hw: pointer to hardware structure + * + **/ +bool ixgbe_fw_recovery_mode(struct ixgbe_hw *hw) +{ + if (hw->mac.ops.fw_recovery_mode) + return hw->mac.ops.fw_recovery_mode(hw); + return false; +} + /** * ixgbe_enter_lplu - Transition to low power states * @hw: pointer to hardware structure diff --git a/sys/dev/ixgbe/ixgbe_api.h b/sys/dev/ixgbe/ixgbe_api.h index c59b3a2dea9c..aabe573127f3 100644 --- a/sys/dev/ixgbe/ixgbe_api.h +++ b/sys/dev/ixgbe/ixgbe_api.h @@ -217,6 +217,7 @@ void ixgbe_disable_mdd(struct ixgbe_hw *hw); void ixgbe_enable_mdd(struct ixgbe_hw *hw); void ixgbe_mdd_event(struct ixgbe_hw *hw, u32 *vf_bitmap); void ixgbe_restore_mdd_vf(struct ixgbe_hw *hw, u32 vf); +bool ixgbe_fw_recovery_mode(struct ixgbe_hw *hw); s32 ixgbe_enter_lplu(struct ixgbe_hw *hw); s32 ixgbe_handle_lasi(struct ixgbe_hw *hw); void ixgbe_set_rate_select_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed); diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index 9619b771ea89..c3c29dbdba52 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -1080,6 +1080,9 @@ struct ixgbe_dmac_config { #define IXGBE_FWSM_MODE_MASK 0xE #define IXGBE_FWSM_TS_ENABLED 0x1 #define IXGBE_FWSM_FW_MODE_PT 0x4 +#define IXGBE_FWSM_FW_NVM_RECOVERY_MODE (1 << 5) +#define IXGBE_FWSM_EXT_ERR_IND_MASK 0x01F8 +#define IXGBE_FWSM_FW_VAL_BIT (1 << 15) /* ARC Subsystem registers */ #define IXGBE_HICR 0x15F00 @@ -4010,6 +4013,7 @@ struct ixgbe_mac_operations { void (*enable_mdd)(struct ixgbe_hw *hw); void (*mdd_event)(struct ixgbe_hw *hw, u32 *vf_bitmap); void (*restore_mdd_vf)(struct ixgbe_hw *hw, u32 vf); + bool (*fw_recovery_mode)(struct ixgbe_hw *hw); }; struct ixgbe_phy_operations { diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 6edeeb178289..aa91c4da7019 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -83,6 +83,7 @@ s32 ixgbe_init_ops_X550(struct ixgbe_hw *hw) mac->ops.enable_mdd = ixgbe_enable_mdd_X550; mac->ops.mdd_event = ixgbe_mdd_event_X550; mac->ops.restore_mdd_vf = ixgbe_restore_mdd_vf_X550; + mac->ops.fw_recovery_mode = ixgbe_fw_recovery_mode_X550; mac->ops.disable_rx = ixgbe_disable_rx_x550; /* Manageability interface */ mac->ops.set_fw_drv_ver = ixgbe_set_fw_drv_ver_x550; @@ -4676,3 +4677,18 @@ s32 ixgbe_set_fw_drv_ver_x550(struct ixgbe_hw *hw, u8 maj, u8 min, return ret_val; } + +/** + * ixgbe_fw_recovery_mode_X550 - Check FW NVM recovery mode + * @hw: pointer t hardware structure + * + * Returns true if in FW NVM recovery mode. + **/ +bool ixgbe_fw_recovery_mode_X550(struct ixgbe_hw *hw) +{ + u32 fwsm; + + fwsm = IXGBE_READ_REG(hw, IXGBE_FWSM_BY_MAC(hw)); + + return !!(fwsm & IXGBE_FWSM_FW_NVM_RECOVERY_MODE); +} diff --git a/sys/dev/ixgbe/ixgbe_x550.h b/sys/dev/ixgbe/ixgbe_x550.h index 44c9d06a42d9..ac2de750cfb7 100644 --- a/sys/dev/ixgbe/ixgbe_x550.h +++ b/sys/dev/ixgbe/ixgbe_x550.h @@ -122,4 +122,5 @@ s32 ixgbe_reset_phy_t_X550em(struct ixgbe_hw *hw); s32 ixgbe_identify_sfp_module_X550em(struct ixgbe_hw *hw); s32 ixgbe_led_on_t_X550em(struct ixgbe_hw *hw, u32 led_idx); s32 ixgbe_led_off_t_X550em(struct ixgbe_hw *hw, u32 led_idx); +bool ixgbe_fw_recovery_mode_X550(struct ixgbe_hw *hw); #endif /* _IXGBE_X550_H_ */ ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 79b36ec91dec - main - ixgbe: Use C99 bool types
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=79b36ec91decc18d062fc428e2fd34d41aba0630 commit 79b36ec91decc18d062fc428e2fd34d41aba0630 Author: Kevin Bowling AuthorDate: 2021-09-07 02:54:22 + Commit: Kevin Bowling CommitDate: 2021-09-07 02:54:22 + ixgbe: Use C99 bool types Approved by:imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/if_ix.c | 86 +- sys/dev/ixgbe/if_ixv.c | 30 +- sys/dev/ixgbe/if_sriov.c| 24 sys/dev/ixgbe/ix_txrx.c | 12 ++-- sys/dev/ixgbe/ixgbe.h | 4 +- sys/dev/ixgbe/ixgbe_82598.c | 48 +++ sys/dev/ixgbe/ixgbe_82599.c | 104 sys/dev/ixgbe/ixgbe_api.c | 14 ++--- sys/dev/ixgbe/ixgbe_common.c| 130 sys/dev/ixgbe/ixgbe_dcb.c | 2 +- sys/dev/ixgbe/ixgbe_dcb_82599.c | 10 ++-- sys/dev/ixgbe/ixgbe_mbx.c | 2 +- sys/dev/ixgbe/ixgbe_mbx.h | 2 +- sys/dev/ixgbe/ixgbe_osdep.h | 4 -- sys/dev/ixgbe/ixgbe_phy.c | 84 +- sys/dev/ixgbe/ixgbe_vf.c| 18 +++--- sys/dev/ixgbe/ixgbe_x540.c | 8 +-- sys/dev/ixgbe/ixgbe_x550.c | 98 +++--- 18 files changed, 338 insertions(+), 342 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 91bf7e4dd218..42523f82cc01 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -332,7 +332,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, 0, * of unsupported SFP+ modules, note that * doing so you are on your own :) */ -static int allow_unsupported_sfp = FALSE; +static int allow_unsupported_sfp = false; SYSCTL_INT(_hw_ix, OID_AUTO, unsupported_sfp, CTLFLAG_RDTUN, &allow_unsupported_sfp, 0, "Allow unsupported SFP modules...use at your own risk"); @@ -356,7 +356,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, 0, * is varied over time based on the * traffic for that interrupt vector */ -static int ixgbe_enable_aim = FALSE; +static int ixgbe_enable_aim = false; SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &ixgbe_enable_aim, 0, "Enable adaptive interrupt moderation"); @@ -943,7 +943,7 @@ ixgbe_if_attach_pre(if_ctx_t ctx) /* Verify adapter fan is still functional (if applicable) */ if (adapter->feat_en & IXGBE_FEATURE_FAN_FAIL) { u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); - ixgbe_check_fan_failure(adapter, esdp, FALSE); + ixgbe_check_fan_failure(adapter, esdp, false); } /* Ensure SW/FW semaphore is free */ @@ -952,16 +952,16 @@ ixgbe_if_attach_pre(if_ctx_t ctx) /* Set an initial default flow control value */ hw->fc.requested_mode = ixgbe_flow_control; - hw->phy.reset_if_overtemp = TRUE; + hw->phy.reset_if_overtemp = true; error = ixgbe_reset_hw(hw); - hw->phy.reset_if_overtemp = FALSE; + hw->phy.reset_if_overtemp = false; if (error == IXGBE_ERR_SFP_NOT_PRESENT) { /* * No optics in this port, set up * so the timer routine will probe * for later insertion. */ - adapter->sfp_probe = TRUE; + adapter->sfp_probe = true; error = 0; } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) { device_printf(dev, "Unsupported SFP+ module detected!\n"); @@ -1097,7 +1097,7 @@ ixgbe_if_attach_post(if_ctx_t ctx) ixgbe_enable_tx_laser(hw); /* Enable power to the phy. */ - ixgbe_set_phy_power(hw, TRUE); + ixgbe_set_phy_power(hw, true); ixgbe_initialize_iov(adapter); @@ -1366,23 +1366,23 @@ ixgbe_is_sfp(struct ixgbe_hw *hw) switch (hw->mac.type) { case ixgbe_mac_82598EB: if (hw->phy.type == ixgbe_phy_nl) - return (TRUE); - return (FALSE); + return (true); + return (false); case ixgbe_mac_82599EB: switch (hw->mac.ops.get_media_type(hw)) { case ixgbe_media_type_fiber: case ixgbe_media_type_fiber_qsfp: - return (TRUE); + return (true); default: - return (FALSE); + return (false); } case ixgbe_mac_X550EM_x: case ixgbe_mac_X550EM_a: if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) - return (TRUE); - return (FALSE); + return (true); + return (false); default: - return (FAL
git: 4cdc5e12a849 - main - ixgbe: remove whitespace in function comments
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=4cdc5e12a849871e4e8062a62a31f28545901d84 commit 4cdc5e12a849871e4e8062a62a31f28545901d84 Author: Kevin Bowling AuthorDate: 2021-09-07 03:26:44 + Commit: Kevin Bowling CommitDate: 2021-09-07 04:17:18 + ixgbe: remove whitespace in function comments Remove unnecessary extra whitespace on all function comments, replacing ' * ' with ' * '. This was done automatically via sed using the following transformation: sed 's/^ \* / * /' Signed-off-by: Jacob Keller Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (40023f73c76579e58a859dab87b4c30278eb2e48) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_82598.c | 238 +- sys/dev/ixgbe/ixgbe_82599.c | 384 sys/dev/ixgbe/ixgbe_api.c| 890 ++-- sys/dev/ixgbe/ixgbe_common.c | 1030 +- sys/dev/ixgbe/ixgbe_dcb.c|6 +- sys/dev/ixgbe/ixgbe_fdir.h |2 +- sys/dev/ixgbe/ixgbe_mbx.c| 194 sys/dev/ixgbe/ixgbe_phy.c| 394 sys/dev/ixgbe/ixgbe_vf.c | 166 +++ sys/dev/ixgbe/ixgbe_x540.c | 188 sys/dev/ixgbe/ixgbe_x550.c | 480 ++-- 11 files changed, 1986 insertions(+), 1986 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_82598.c b/sys/dev/ixgbe/ixgbe_82598.c index c1d657afb6f5..1bfdcae6da55 100644 --- a/sys/dev/ixgbe/ixgbe_82598.c +++ b/sys/dev/ixgbe/ixgbe_82598.c @@ -69,14 +69,14 @@ static void ixgbe_set_rxpba_82598(struct ixgbe_hw *hw, int num_pb, static s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset, u8 *sff8472_data); /** - * ixgbe_set_pcie_completion_timeout - set pci-e completion timeout - * @hw: pointer to the HW structure + * ixgbe_set_pcie_completion_timeout - set pci-e completion timeout + * @hw: pointer to the HW structure * - * The defaults for 82598 should be in the range of 50us to 50ms, - * however the hardware default for these parts is 500us to 1ms which is less - * than the 10ms recommended by the pci-e spec. To address this we need to - * increase the value to either 10ms to 250ms for capability version 1 config, - * or 16ms to 55ms for version 2. + * The defaults for 82598 should be in the range of 50us to 50ms, + * however the hardware default for these parts is 500us to 1ms which is less + * than the 10ms recommended by the pci-e spec. To address this we need to + * increase the value to either 10ms to 250ms for capability version 1 config, + * or 16ms to 55ms for version 2. **/ void ixgbe_set_pcie_completion_timeout(struct ixgbe_hw *hw) { @@ -111,11 +111,11 @@ out: } /** - * ixgbe_init_ops_82598 - Inits func ptrs and MAC type - * @hw: pointer to hardware structure + * ixgbe_init_ops_82598 - Inits func ptrs and MAC type + * @hw: pointer to hardware structure * - * Initialize the function pointers and assign the MAC type for 82598. - * Does not touch the hardware. + * Initialize the function pointers and assign the MAC type for 82598. + * Does not touch the hardware. **/ s32 ixgbe_init_ops_82598(struct ixgbe_hw *hw) { @@ -181,12 +181,12 @@ s32 ixgbe_init_ops_82598(struct ixgbe_hw *hw) } /** - * ixgbe_init_phy_ops_82598 - PHY/SFP specific init - * @hw: pointer to hardware structure + * ixgbe_init_phy_ops_82598 - PHY/SFP specific init + * @hw: pointer to hardware structure * - * Initialize any function pointers that were not able to be - * set during init_shared_code because the PHY/SFP type was - * not known. Perform the SFP init if necessary. + * Initialize any function pointers that were not able to be + * set during init_shared_code because the PHY/SFP type was + * not known. Perform the SFP init if necessary. * **/ s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw) @@ -245,11 +245,11 @@ out: } /** - * ixgbe_start_hw_82598 - Prepare hardware for Tx/Rx - * @hw: pointer to hardware structure + * ixgbe_start_hw_82598 - Prepare hardware for Tx/Rx + * @hw: pointer to hardware structure * - * Starts the hardware using the generic start_hw function. - * Disables relaxed ordering Then set pcie completion timeout + * Starts the hardware using the generic start_hw function. + * Disables relaxed ordering Then set pcie completion timeout * **/ s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) @@ -287,12 +287,12 @@ s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) } /** - * ixgbe_get_link_capabilities_82598 - Determines link capabilities - * @hw: pointer to hardware structure - * @speed: pointer to link speed - * @autoneg: boolean auto-negotiation value + * ixgbe_get_link_capabilities_82598 - Determines link capabilities + * @hw: pointer to hardware structure
git: dc11ba4eb3fe - main - ixgbe: move increments after evaluations
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=dc11ba4eb3fe5cce615f361de83e85e07005ca24 commit dc11ba4eb3fe5cce615f361de83e85e07005ca24 Author: Guinan Sun AuthorDate: 2020-07-09 08:00:35 + Commit: Kevin Bowling CommitDate: 2021-09-07 04:17:18 + ixgbe: move increments after evaluations The retry variable was being incremented before it was evaluated by the subsequent conditional against the maximum retries to figure out which message to print. So we'll move the increment op to the end. Signed-off-by: Jeb Cramer Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (390445ec30b4c52a3d2887c3d2a202d9cf37ea8e) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_phy.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index 236d6685f8a9..c1cbc282c790 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -169,12 +169,12 @@ fail: ixgbe_i2c_bus_clear(hw); if (lock) hw->mac.ops.release_swfw_sync(hw, swfw_mask); - retry++; if (retry < max_retry) DEBUGOUT("I2C byte read combined error - Retrying.\n"); else DEBUGOUT("I2C byte read combined error.\n"); - } while (retry < max_retry); + retry++; + } while (retry <= max_retry); return IXGBE_ERR_I2C; } @@ -234,12 +234,12 @@ fail: ixgbe_i2c_bus_clear(hw); if (lock) hw->mac.ops.release_swfw_sync(hw, swfw_mask); - retry++; if (retry < max_retry) DEBUGOUT("I2C byte write combined error - Retrying.\n"); else DEBUGOUT("I2C byte write combined error.\n"); - } while (retry < max_retry); + retry++; + } while (retry <= max_retry); return IXGBE_ERR_I2C; } @@ -2066,13 +2066,12 @@ fail: hw->mac.ops.release_swfw_sync(hw, swfw_mask); msec_delay(100); } - retry++; if (retry < max_retry) DEBUGOUT("I2C byte read error - Retrying.\n"); else DEBUGOUT("I2C byte read error.\n"); - - } while (retry < max_retry); + retry++; + } while (retry <= max_retry); return status; } @@ -2170,12 +2169,12 @@ static s32 ixgbe_write_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset, fail: ixgbe_i2c_bus_clear(hw); - retry++; if (retry < max_retry) DEBUGOUT("I2C byte write error - Retrying.\n"); else DEBUGOUT("I2C byte write error.\n"); - } while (retry < max_retry); + retry++; + } while (retry <= max_retry); if (lock) hw->mac.ops.release_swfw_sync(hw, swfw_mask); ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 0b487fb4547a - main - ixgbe: remove dead code
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0b487fb4547ad1a939be0d523e57c94b7cd1 commit 0b487fb4547ad1a939be0d523e57c94b7cd1 Author: Ferruh Yigit AuthorDate: 2020-06-30 14:45:54 + Commit: Kevin Bowling CommitDate: 2021-09-07 03:06:53 + ixgbe: remove dead code The question around getting rid of the assignments seems lived long enough, if they are not needed until now, we can drop them. Signed-off-by: Ferruh Yigit Acked-by: Qi Zhang Approved by:imp Obtained from: DPDK (a6395d471e14e5a7432875dad8fb3533238c5167) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_dcb_82598.c | 8 1 file changed, 8 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_dcb_82598.c b/sys/dev/ixgbe/ixgbe_dcb_82598.c index 37744462bc07..20a350716289 100644 --- a/sys/dev/ixgbe/ixgbe_dcb_82598.c +++ b/sys/dev/ixgbe/ixgbe_dcb_82598.c @@ -67,14 +67,6 @@ s32 ixgbe_dcb_get_tc_stats_82598(struct ixgbe_hw *hw, stats->qprc[tc] += IXGBE_READ_REG(hw, IXGBE_QPRC(tc)); /* Received Bytes */ stats->qbrc[tc] += IXGBE_READ_REG(hw, IXGBE_QBRC(tc)); - -#if 0 - /* Can we get rid of these?? Consequently, getting rid -* of the tc_stats structure. -*/ - tc_stats_array[up]->in_overflow_discards = 0; - tc_stats_array[up]->out_overflow_discards = 0; -#endif } return IXGBE_SUCCESS; ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 8455e365f77f - main - ixgbe: Update copyright to 2020
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8455e365f77f5b66ac9521dbcd690f79345ce147 commit 8455e365f77f5b66ac9521dbcd690f79345ce147 Author: Kevin Bowling AuthorDate: 2021-09-07 03:11:44 + Commit: Kevin Bowling CommitDate: 2021-09-07 03:13:28 + ixgbe: Update copyright to 2020 Synced to the ixgbe shared code with DPDK shared code which has local fixes on top of "not-released-cid-ixgbe.2020.06.09.tar.gz" Approved by:imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_82598.c | 2 +- sys/dev/ixgbe/ixgbe_82598.h | 2 +- sys/dev/ixgbe/ixgbe_82599.c | 2 +- sys/dev/ixgbe/ixgbe_82599.h | 2 +- sys/dev/ixgbe/ixgbe_api.c | 2 +- sys/dev/ixgbe/ixgbe_api.h | 2 +- sys/dev/ixgbe/ixgbe_bypass.h| 2 +- sys/dev/ixgbe/ixgbe_common.c| 2 +- sys/dev/ixgbe/ixgbe_common.h| 2 +- sys/dev/ixgbe/ixgbe_dcb.c | 2 +- sys/dev/ixgbe/ixgbe_dcb.h | 2 +- sys/dev/ixgbe/ixgbe_dcb_82598.c | 2 +- sys/dev/ixgbe/ixgbe_dcb_82598.h | 2 +- sys/dev/ixgbe/ixgbe_dcb_82599.c | 2 +- sys/dev/ixgbe/ixgbe_dcb_82599.h | 2 +- sys/dev/ixgbe/ixgbe_fdir.h | 2 +- sys/dev/ixgbe/ixgbe_features.h | 2 +- sys/dev/ixgbe/ixgbe_mbx.c | 2 +- sys/dev/ixgbe/ixgbe_mbx.h | 2 +- sys/dev/ixgbe/ixgbe_osdep.c | 2 +- sys/dev/ixgbe/ixgbe_osdep.h | 2 +- sys/dev/ixgbe/ixgbe_phy.c | 2 +- sys/dev/ixgbe/ixgbe_phy.h | 2 +- sys/dev/ixgbe/ixgbe_rss.h | 2 +- sys/dev/ixgbe/ixgbe_sriov.h | 2 +- sys/dev/ixgbe/ixgbe_type.h | 2 +- sys/dev/ixgbe/ixgbe_vf.c| 2 +- sys/dev/ixgbe/ixgbe_vf.h| 2 +- sys/dev/ixgbe/ixgbe_x540.c | 2 +- sys/dev/ixgbe/ixgbe_x540.h | 2 +- sys/dev/ixgbe/ixgbe_x550.c | 2 +- sys/dev/ixgbe/ixgbe_x550.h | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_82598.c b/sys/dev/ixgbe/ixgbe_82598.c index 885dfbf869bc..c1d657afb6f5 100644 --- a/sys/dev/ixgbe/ixgbe_82598.c +++ b/sys/dev/ixgbe/ixgbe_82598.c @@ -1,7 +1,7 @@ /** SPDX-License-Identifier: BSD-3-Clause - Copyright (c) 2001-2017, Intel Corporation + Copyright (c) 2001-2020, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ixgbe/ixgbe_82598.h b/sys/dev/ixgbe/ixgbe_82598.h index dc69c026423c..09b8c6054109 100644 --- a/sys/dev/ixgbe/ixgbe_82598.h +++ b/sys/dev/ixgbe/ixgbe_82598.h @@ -1,7 +1,7 @@ /** SPDX-License-Identifier: BSD-3-Clause - Copyright (c) 2001-2017, Intel Corporation + Copyright (c) 2001-2020, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index d682dfbc9ab8..f692c19dc979 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -1,7 +1,7 @@ /** SPDX-License-Identifier: BSD-3-Clause - Copyright (c) 2001-2017, Intel Corporation + Copyright (c) 2001-2020, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ixgbe/ixgbe_82599.h b/sys/dev/ixgbe/ixgbe_82599.h index ee9a33667e62..2e9a0407a610 100644 --- a/sys/dev/ixgbe/ixgbe_82599.h +++ b/sys/dev/ixgbe/ixgbe_82599.h @@ -1,7 +1,7 @@ /** SPDX-License-Identifier: BSD-3-Clause - Copyright (c) 2001-2017, Intel Corporation + Copyright (c) 2001-2020, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ixgbe/ixgbe_api.c b/sys/dev/ixgbe/ixgbe_api.c index 2ae2db78d0ed..5bb5d196e2c0 100644 --- a/sys/dev/ixgbe/ixgbe_api.c +++ b/sys/dev/ixgbe/ixgbe_api.c @@ -1,7 +1,7 @@ /** SPDX-License-Identifier: BSD-3-Clause - Copyright (c) 2001-2017, Intel Corporation + Copyright (c) 2001-2020, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ixgbe/ixgbe_api.h b/sys/dev/ixgbe/ixgbe_api.h index aabe573127f3..c70f27c6aa2c 100644 --- a/sys/dev/ixgbe/ixgbe_api.h +++ b/sys/dev/ixgbe/ixgbe_api.h @@ -1,7 +1,7 @@ /** SPDX-License-Identifier: BSD-3-Clause - Copyright (c) 2001-2017, Intel Corporation + Copyright (c) 2001-2020, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without diff -
git: 0a4f0befab9d - main - ixgbe: update X550 SFP identification
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0a4f0befab9d3a048232b00bea77bf3da20cfdd0 commit 0a4f0befab9d3a048232b00bea77bf3da20cfdd0 Author: Xiaoyun Li AuthorDate: 2018-09-17 09:28:12 + Commit: Kevin Bowling CommitDate: 2021-09-07 04:17:13 + ixgbe: update X550 SFP identification Use ixgbe_identify_sfp_module_X550em to update SFP identification flow. ixgbe_identify_sfp_module_X550em includes specific checks for X550 about supported SFP modules. Signed-off-by: Xiaoyun Li Acked-by: Qi Zhang Approved by:imp Obtained from: DPDK (175bedb0cc8f801be3050fa35b8d8d0971cea7cc) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_x550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index df19c4c65201..1c79dda6c235 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -351,7 +351,7 @@ static s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw) switch (hw->device_id) { case IXGBE_DEV_ID_X550EM_A_SFP: - return ixgbe_identify_module_generic(hw); + return ixgbe_identify_sfp_module_X550em(hw); case IXGBE_DEV_ID_X550EM_X_SFP: /* set up for CS4227 usage */ ixgbe_setup_mux_ctl(hw); @@ -359,7 +359,7 @@ static s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw) /* Fallthrough */ case IXGBE_DEV_ID_X550EM_A_SFP_N: - return ixgbe_identify_module_generic(hw); + return ixgbe_identify_sfp_module_X550em(hw); break; case IXGBE_DEV_ID_X550EM_X_KX4: hw->phy.type = ixgbe_phy_x550em_kx4; ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 3a89005394bc - main - ixgbe: remove unnecessary return value check
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3a89005394bc5d82ce9b6baa9e7f8dee362354ae commit 3a89005394bc5d82ce9b6baa9e7f8dee362354ae Author: Guinan Sun AuthorDate: 2020-07-09 08:00:38 + Commit: Kevin Bowling CommitDate: 2021-09-07 04:17:19 + ixgbe: remove unnecessary return value check Remove unnecessary return value check. Signed-off-by: Jakub Chylkowski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (4b0ee6529b7897c2a08dd56669f07ac1f46a8474) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_82599.c | 4 +--- sys/dev/ixgbe/ixgbe_common.c | 4 +--- sys/dev/ixgbe/ixgbe_common.h | 2 +- sys/dev/ixgbe/ixgbe_phy.c| 25 +++-- sys/dev/ixgbe/ixgbe_x540.c | 2 +- 5 files changed, 11 insertions(+), 26 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 0222acd2f0d5..9eb3904a30f9 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -2130,9 +2130,7 @@ s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw) if (ret_val != IXGBE_SUCCESS) goto out; - ret_val = ixgbe_start_hw_gen2(hw); - if (ret_val != IXGBE_SUCCESS) - goto out; + ixgbe_start_hw_gen2(hw); /* We need to run link autotry after the driver loads */ hw->mac.autotry_restart = true; diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 97a392829538..d049b7c6d9cd 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -457,7 +457,7 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw) *82599 *X540 **/ -s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) +void ixgbe_start_hw_gen2(struct ixgbe_hw *hw) { u32 i; u32 regval; @@ -482,8 +482,6 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) IXGBE_DCA_RXCTRL_HEAD_WRO_EN); IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval); } - - return IXGBE_SUCCESS; } /** diff --git a/sys/dev/ixgbe/ixgbe_common.h b/sys/dev/ixgbe/ixgbe_common.h index b072770acafa..051af213b628 100644 --- a/sys/dev/ixgbe/ixgbe_common.h +++ b/sys/dev/ixgbe/ixgbe_common.h @@ -56,7 +56,7 @@ u16 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw); s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw); s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw); s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw); -s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw); +void ixgbe_start_hw_gen2(struct ixgbe_hw *hw); s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw); s32 ixgbe_read_pba_num_generic(struct ixgbe_hw *hw, u32 *pba_num); s32 ixgbe_read_pba_string_generic(struct ixgbe_hw *hw, u8 *pba_num, diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index e9e1dd2d8c1c..5a2f49e9ebac 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -39,10 +39,10 @@ static void ixgbe_i2c_start(struct ixgbe_hw *hw); static void ixgbe_i2c_stop(struct ixgbe_hw *hw); -static s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data); +static void ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data); static s32 ixgbe_clock_out_i2c_byte(struct ixgbe_hw *hw, u8 data); static s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw); -static s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data); +static void ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data); static s32 ixgbe_clock_out_i2c_bit(struct ixgbe_hw *hw, bool data); static void ixgbe_raise_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl); static void ixgbe_lower_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl); @@ -77,11 +77,7 @@ static s32 ixgbe_out_i2c_byte_ack(struct ixgbe_hw *hw, u8 byte) */ static s32 ixgbe_in_i2c_byte_ack(struct ixgbe_hw *hw, u8 *byte) { - s32 status; - - status = ixgbe_clock_in_i2c_byte(hw, byte); - if (status) - return status; + ixgbe_clock_in_i2c_byte(hw, byte); /* ACK */ return ixgbe_clock_out_i2c_bit(hw, false); } @@ -154,8 +150,7 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg, if (ixgbe_in_i2c_byte_ack(hw, &low_bits)) goto fail; /* Get csum */ - if (ixgbe_clock_in_i2c_byte(hw, &csum_byte)) - goto fail; + ixgbe_clock_in_i2c_byte(hw, &csum_byte); /* NACK */ if (ixgbe_clock_out_i2c_bit(hw, false)) goto fail; @@ -2043,9 +2038,7 @@ static s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset, if (status != IXGBE_SUCCESS) goto fail; - status = ixgbe_clock_in_i2c_byte(hw, data); - if (status != IXGBE_SUCCESS) -
git: 9e65ae746da2 - main - ixgbe: support DCB registers dump
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=9e65ae746da23e1affdf66adb8944656a9da003c commit 9e65ae746da23e1affdf66adb8944656a9da003c Author: Xiaoyun Li AuthorDate: 2018-09-17 09:28:13 + Commit: Kevin Bowling CommitDate: 2021-09-07 04:17:18 + ixgbe: support DCB registers dump Add support for DCB registers dump. Signed-off-by: Xiaoyun Li Acked-by: Qi Zhang Approved by:imp Obtained from: DPDK (36a036bc6fdd0da74576a39ab74e50954598ba82) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_type.h | 5 + 1 file changed, 5 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index a538af5d3569..48751e7386bb 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -863,6 +863,10 @@ struct ixgbe_dmac_config { #define IXGBE_RTTDQSEL 0x04904 #define IXGBE_RTTDT1C 0x04908 #define IXGBE_RTTDT1S 0x0490C +#define IXGBE_RTTQCNCR 0x08B00 +#define IXGBE_RTTQCNTG 0x04A90 +#define IXGBE_RTTBCNRD 0x0498C +#define IXGBE_RTTQCNRR 0x0498C #define IXGBE_RTTDTECC 0x04990 #define IXGBE_RTTDTECC_NO_BCN 0x0100 @@ -873,6 +877,7 @@ struct ixgbe_dmac_config { #define IXGBE_RTTBCNRC_RF_INT_MASK \ (IXGBE_RTTBCNRC_RF_DEC_MASK << IXGBE_RTTBCNRC_RF_INT_SHIFT) #define IXGBE_RTTBCNRM 0x04980 +#define IXGBE_RTTQCNRM 0x04980 /* BCN (for DCB) Registers */ #define IXGBE_RTTBCNRS 0x04988 ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: ff8db817abbd - main - ixgbe: add register definitions for NVM update
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ff8db817abbd348f0a7518ce32f0e52c6ab8e06e commit ff8db817abbd348f0a7518ce32f0e52c6ab8e06e Author: Guinan Sun AuthorDate: 2020-07-09 08:00:32 + Commit: Kevin Bowling CommitDate: 2021-09-07 04:17:18 + ixgbe: add register definitions for NVM update Added additional register for X550 and above device family. Signed-off-by: Piotr Skajewski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (4a6847d78814b1c3df896efe31562643d419317d) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_type.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index 48751e7386bb..1c04f09df77c 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -1095,8 +1095,10 @@ struct ixgbe_dmac_config { #define IXGBE_HSMC0R 0x15F04 #define IXGBE_HSMC1R 0x15F08 #define IXGBE_SWSR 0x15F10 +#define IXGBE_FWRESETCNT 0x15F40 #define IXGBE_HFDR 0x15FE8 #define IXGBE_FLEX_MNG 0x15800 /* 0x15800 - 0x15EFC */ +#define IXGBE_FLEX_MNG_PTR(_i) (IXGBE_FLEX_MNG + ((_i) * 4)) #define IXGBE_HICR_EN 0x01 /* Enable bit - RO */ /* Driver sets this bit when done to put command in RAM */ ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 5fd1f4be8d81 - main - ixgbe: increase the timeout
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5fd1f4be8d81a0019c632103121d68e2f20bc238 commit 5fd1f4be8d81a0019c632103121d68e2f20bc238 Author: Qiming Yang AuthorDate: 2018-01-10 16:04:33 + Commit: Kevin Bowling CommitDate: 2021-09-07 04:17:19 + ixgbe: increase the timeout Increase SECRX_RDY polling frequency and semaphore timeout which fixes the FWSW.PT check in ixgbe_mng_present(). Signed-off-by: Qiming Yang Acked-by: Wenzhuo Lu Approved by:imp Obtained from: DPDK (6175260d12cc22852cecf2fb7ecd95cdb07611b5) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index d049b7c6d9cd..50e18bcba997 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -3356,7 +3356,7 @@ void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u32 mask) **/ s32 ixgbe_disable_sec_rx_path_generic(struct ixgbe_hw *hw) { -#define IXGBE_MAX_SECRX_POLL 40 +#define IXGBE_MAX_SECRX_POLL 4000 int i; int secrxreg; @@ -3373,7 +3373,7 @@ s32 ixgbe_disable_sec_rx_path_generic(struct ixgbe_hw *hw) break; else /* Use interrupt-safe sleep just in case */ - usec_delay(1000); + usec_delay(10); } /* For informational purposes only */ ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 80a39a2bda82 - main - ixgbe: create function to restart autoneg
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=80a39a2bda8208c716f614f792c8d9a3628d6c26 commit 80a39a2bda8208c716f614f792c8d9a3628d6c26 Author: Guinan Sun AuthorDate: 2020-07-09 08:00:36 + Commit: Kevin Bowling CommitDate: 2021-09-07 04:17:19 + ixgbe: create function to restart autoneg This patch is for restarting auto negotiation on PHY. Signed-off-by: Jakub Chylkowski Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (664ea2614eafbec8eda5c86764ff047475a1e5c6) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_phy.c | 48 ++- sys/dev/ixgbe/ixgbe_phy.h | 1 + 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index c1cbc282c790..e9e1dd2d8c1c 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -573,6 +573,26 @@ out: return status; } +/** + * ixgbe_restart_auto_neg - Restart auto negotiation on the PHY + * @hw: pointer to hardware structure + **/ +void ixgbe_restart_auto_neg(struct ixgbe_hw *hw) +{ + u16 autoneg_reg; + + /* Check if PHY reset is blocked by MNG FW */ + if (ixgbe_check_reset_blocked(hw)) + return; + + /* Restart PHY auto-negotiation. */ + hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL, + IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg); + autoneg_reg |= IXGBE_MII_RESTART; + hw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL, + IXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg); +} + /** * ixgbe_read_phy_mdi - Reads a value from a specified PHY register without * the SWFW lock @@ -857,19 +877,7 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw) IXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg); - /* Blocked by MNG FW so don't reset PHY */ - if (ixgbe_check_reset_blocked(hw)) - return status; - - /* Restart PHY auto-negotiation. */ - hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL, -IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg); - - autoneg_reg |= IXGBE_MII_RESTART; - - hw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL, - IXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg); - + ixgbe_restart_auto_neg(hw); return status; } @@ -1093,19 +1101,7 @@ s32 ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw) autoneg_reg); } - /* Blocked by MNG FW so don't reset PHY */ - if (ixgbe_check_reset_blocked(hw)) - return status; - - /* Restart PHY auto-negotiation. */ - hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL, -IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg); - - autoneg_reg |= IXGBE_MII_RESTART; - - hw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL, - IXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg); - + ixgbe_restart_auto_neg(hw); return status; } diff --git a/sys/dev/ixgbe/ixgbe_phy.h b/sys/dev/ixgbe/ixgbe_phy.h index 9fd3f6d2163e..7f51ccc1dd2c 100644 --- a/sys/dev/ixgbe/ixgbe_phy.h +++ b/sys/dev/ixgbe/ixgbe_phy.h @@ -163,6 +163,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id); s32 ixgbe_get_phy_id(struct ixgbe_hw *hw); s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw); s32 ixgbe_reset_phy_generic(struct ixgbe_hw *hw); +void ixgbe_restart_auto_neg(struct ixgbe_hw *hw); s32 ixgbe_read_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, u16 *phy_data); s32 ixgbe_write_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 46981e903cf3 - main - ixgbe: cleanup spelling mistakes in comments
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=46981e903cf3e8e4a5bf7f6152f8ca5b92b37e07 commit 46981e903cf3e8e4a5bf7f6152f8ca5b92b37e07 Author: Guinan Sun AuthorDate: 2020-07-09 08:00:33 + Commit: Kevin Bowling CommitDate: 2021-09-07 04:17:19 + ixgbe: cleanup spelling mistakes in comments Several functions in the driver code have a weird function comment formatting which uses two spaces instead of only one space for the main function body. This formatting will be mechanically fixed by sed in a future patch, but doing so leads to some spelling warnings on that patch. Cleanup the spelling mistakes that will be detected first. This way, it is easier to verify the mechanical transformation done by sed in the following patch. Signed-off-by: Jacob Keller Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Approved by:imp Obtained from: DPDK (fc75eee32037c1379e77e57031c1c353badd2272) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 --- sys/dev/ixgbe/ixgbe_mbx.c | 4 ++-- sys/dev/ixgbe/ixgbe_vf.c | 2 +- sys/dev/ixgbe/ixgbe_x550.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index 3650efc9d2bf..f72bbf34256a 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -69,11 +69,11 @@ out: } /** - * ixgbe_poll_for_ack - Wait for message acknowledgement + * ixgbe_poll_for_ack - Wait for message acknowledgment * @hw: pointer to the HW structure * @mbx_id: id of mailbox to write * - * returns SUCCESS if it successfully received a message acknowledgement + * returns SUCCESS if it successfully received a message acknowledgment **/ static s32 ixgbe_poll_for_ack(struct ixgbe_hw *hw, u16 mbx_id) { diff --git a/sys/dev/ixgbe/ixgbe_vf.c b/sys/dev/ixgbe/ixgbe_vf.c index 895d9e06e1d0..82800b4a3d87 100644 --- a/sys/dev/ixgbe/ixgbe_vf.c +++ b/sys/dev/ixgbe/ixgbe_vf.c @@ -171,7 +171,7 @@ s32 ixgbe_init_hw_vf(struct ixgbe_hw *hw) * ixgbe_reset_hw_vf - Performs hardware reset * @hw: pointer to hardware structure * - * Resets the hardware by reseting the transmit and receive units, masks and + * Resets the hardware by resetting the transmit and receive units, masks and * clears all interrupts. **/ s32 ixgbe_reset_hw_vf(struct ixgbe_hw *hw) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 8a42295ab10e..7fc556662b00 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -1066,7 +1066,7 @@ void ixgbe_set_source_address_pruning_X550(struct ixgbe_hw *hw, bool enable, } /** - * ixgbe_set_ethertype_anti_spoofing_X550 - Enable/Disable Ethertype anti-spoofing + * ixgbe_set_ethertype_anti_spoofing_X550 - Configure Ethertype anti-spoofing * @hw: pointer to hardware structure * @enable: enable or disable switch for Ethertype anti-spoofing * @vf: Virtual Function pool - VF Pool to set for Ethertype anti-spoofing ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"