Commit graph

40834 commits

Author SHA1 Message Date
Gordon Bergling
f207bdd2cc if_age(4): Fix a typo in a source code comment
- s/indepent/independent/

MFC after:	3 days
2022-06-05 09:14:17 +02:00
Gordon Bergling
00b0158d2c mpt(4): Fix two typos in debug statements
- s/Intermidiate/Intermediate/

Obtained from:	NetBSD
MFC after:i	3 days
2022-06-04 20:41:15 +02:00
Gordon Bergling
eb3f25b413 ena(4): Fix a typo in a source code comment
- s/entred/entered/

MFC after:	3 days
2022-06-04 17:17:04 +02:00
Gordon Bergling
3c2ea3ca28 if_sis(4): Fix a typo in a source code comment
- s/emperical/empirical/

MFC after:	3 days
2022-06-04 16:56:18 +02:00
Gordon Bergling
d35e1c29a9 aic7xxx: Fix a few typos in comments and an error message
- s/directrive/directive/
- s/specifiled/specified/
- s/Decend/Descend/
- s/tranversal/transversal/

Obtained from:	NetBSD
MFC after:	3 days
2022-06-04 16:49:53 +02:00
Gordon Bergling
45b143d2ea al_eth: Fix a typo in a source code comment
- s/enought/enough/

MFC after:	3 days
2022-06-04 15:33:36 +02:00
Gordon Bergling
bbb0ca45f8 hptmv(4): Fix a typo in a source code comment
- s/continous/continuous/

MFC after:	3 days
2022-06-04 13:28:52 +02:00
Gordon Bergling
70311ccffc sound(4): Fix a typo in a source code comment
- s/alltogether/altogether/

MFC after:	3 days
2022-06-04 12:11:06 +02:00
Gordon Bergling
b008ab622c le(4): Fix a typo in a source code comment
- s/brodcast/broadcast/

MFC after:	3 days
2022-06-04 12:00:44 +02:00
Gordon Bergling
2cada72c65 aic79xx: Fix a typo in a source code comment
- s/Disble/Disable/

Obtained from:	NetBSD
MFC after:	3days
2022-06-04 11:52:34 +02:00
Gordon Bergling
6e8ab6715d nvmw(4): Fix a typo in a source code comment
- s/inaccessable/inaccessible/

MFC after:	3 days
2022-06-04 11:46:03 +02:00
Gordon Bergling
68c0bd3e3f amdsbwd(4): Fix a typo in a source code comment
- s/accross/across/

MFC after:	3 days
2022-06-04 11:26:44 +02:00
Alexander Motin
1326017849 hwpmc: Add IDs for few more Intel Atom CPUs.
MFC after:	1 month
2022-06-02 22:55:42 -04:00
Alexander Motin
326a8d3e08 hwpmc: Skip GLOBAL_CTRL updates on stop_pmc().
After we wipe PMC configuration, including its local enable bit(s),
we don't really care about its global enable bit.  Global enable bits
now may only be cleared by interrupt handler in case of error (sample
buffer overflow).  Being set is actually a reset default for them.

This saves one WRMSR per process-scope PMC per context switch, that
is clearly visible in profiles.

MFC after:	1 month
2022-06-02 18:35:55 -04:00
Doug Moore
04e86ae357 busdma_iommu: simplify split logic
iommu_bus_dmamap_load_something1 includes code for handling the
possibility of splitting a buffer that is needlessly complex.
Simplify it.

Reviewed by:	alc, kib
MFC after:	3 weeks
Tested by: pho (previous revisions)
Differential Revision:	https://reviews.freebsd.org/D35232
2022-06-02 15:59:57 -05:00
Alexander Motin
1a4614a51e hwpmc: Bump Intel's IA32_PERFEVTSELx width to 64 bits.
Haswell added there bits 32/33 for TSX, and AlderLake added bit 34
for Adaptive PEBS Record.

MFC after:	1 month
2022-06-02 13:08:55 -04:00
Mitchell Horne
35eb9b10c2 Use KERNEL_PANICKED() in more places
This is slightly more optimized than checking panicstr directly. For
most of these instances performance doesn't matter, but let's make
KERNEL_PANICKED() the common idiom.

Reviewed by:	mjg
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D35373
2022-06-02 10:15:43 -03:00
Alexander Motin
47699fc265 hwpmc: Make powerpc memory allocation alike to x86.
It should remove some unneeded pointer dereferences.

MFC after:	1 month
2022-06-01 14:53:04 -04:00
Alexander Motin
5acb4c862b hwpmc: Remove always zero pc_resync field.
MFC after:	1 month
2022-06-01 11:07:39 -04:00
Alexander Motin
fe109d3113 hwpmc: Add basic Intel Alderlake CPUs support.
The PMC subsystem is not designed for non-uniform CPU capabilities
(P/E-cores are different), but at least several working architectural
events like cpu_clk_unhalted.thread_p should be better than nothing.

MFC after:	1 month
2022-05-30 23:17:37 -04:00
Alexander Motin
ae57fbc7ec hwpmc: Update Intel's programmable counters restrictions.
Primarily remove unneeded restrictions from later CPUs.

MFC after:	1 month
2022-05-30 22:54:00 -04:00
Alexander Motin
c1e813d123 hwpmc: Correct selection of Intel fixed counters.
Intel json's use event=0 to specify fixed counter number via umask.
Alternatively fixed counters have equivalent programmable event/umask.

MFC after:	1 month
2022-05-30 20:05:15 -04:00
Hans Petter Selasky
f29c9901a4 mlx4core: Fix a memory leak when deleting slave's resources
mlx4_delete_all_resources_for_slave() in the resource tracker should free
all memory allocated for a slave. While releasing memory of fs_rule,
it misses releasing memory of fs_rule->mirr_mbox.

Linux commit:
461d5f1b59490ce0096dfda45e10038c122a7892

PR:		264249
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-05-30 20:22:18 +02:00
Alexander Motin
81ffb45f02 hwpmc: Use hardware PMCs freezing on PMI on Intel v2+.
Since version 2 Intel CPUs can freeze PMCs when intering PMI to reduce
PMI effects on collected statistics.  Since version 4 hardware supports
"streamlined" mechanism, not requiring IA_GLOBAL_CTRL MSR access.

MFC after:	1 month
2022-05-30 09:17:34 -04:00
Alexander Motin
245b056556 hwpmc: Add Intel Core register defines up to version 5.
MFC after:	1 month
2022-05-28 22:11:59 -04:00
John Baldwin
8020c05683 cxgbei: Adjust the calculation for the maximum ISO payload.
Round down the maximim ISO payload by the current MSS.  Otherwise the
round up by MSS when calculating the 16-bit maximum payload len passed
along in the FLOWC work request can overflow.

Discussed with:	np
Sponsored by:	Chelsio Communications
2022-05-26 14:32:54 -07:00
Emmanuel Vadot
e26ef41f79 backlight: Update cached value when getting the brightness
External events can cause the backlight level to change (AC adapter
plug/unplug for example) so cache the value there too.

PR:		257796
Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	1 week
2022-05-25 16:50:25 +02:00
Eric Joyner
a6e275af46
irdma(4): Fix previous commit that broke build on amd64
Changing the printf specifier to %p fixed the build on powerpc64, but it
actually broke the amd64 build since the type of the value to be printed
is uint64_t on amd64.

Instead, keep the new %p specifier but cast the printed argument to a
uintptr_t and then to a void * in order for it to be valid type for
%p.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reported by:	jrtc27@
MFC after:	5 days
MFC-with:	e602a30bb9
Sponsored by:	Intel Corporation
2022-05-25 00:05:19 -07:00
Eric Joyner
e602a30bb9
irdma(4): Fix compile error on powerpc64
Jenkins reports that the type used in a printf() specifier is
incorrect, so fix it in order to use the appropriate type.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reported by:	Jenkins CI
MFC after:	6 days
MFC-with:	cdcd52d41e
Sponsored by:	Intel Corporation
2022-05-24 17:30:46 -07:00
Konstantin Belousov
3a364a6b91 mlx5en: formally declare supoort for RXTLS
Reviewed by:	hselasky
Sponsored by:	NVIDIA Networking
MFC after:	3 weeks
Differential revision:	https://reviews.freebsd.org/D32551
2022-05-24 23:59:32 +03:00
Konstantin Belousov
f7ea19958b Convert mlx5_en to SIOCSIFCAPNV
Reviewed by:	hselasky, jhb, kp (previous version)
Sponsored by:	NVIDIA Networking
MFC after:	3 weeks
Differential revision:	https://reviews.freebsd.org/D32551
2022-05-24 23:59:32 +03:00
Krzysztof Galazka
b7b40e4a38
ixl(4): Add support for I710 devices and remove non-inclusive language
Intel introduces a new line of 1G Ethernet adapters
with Device ID 0x0DD2. While at that also remove
non-inclusive language.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	kbowling@
Tested by:	gowtham.kumar.ks@intel.com
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D34924
2022-05-24 09:12:49 -07:00
Bartosz Sobczak
cdcd52d41e
irdma: Add RDMA driver for Intel(R) Ethernet Controller E810
This is an initial commit for RDMA FreeBSD driver for Intel(R) Ethernet
Controller E810, called irdma.  Supporting both RoCEv2 and iWARP
protocols in per-PF manner, RoCEv2 being the default.

Testing has been done using krping tool, perftest, ucmatose, rping,
ud_pingpong, rc_pingpong and others.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	#manpages (pauamma_gundo.com) [documentation]
MFC after:	1 week
Relnotes:	yes
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D34690
2022-05-23 16:52:49 -07:00
Eric Joyner
8a13362d49
ice(4): Add RDMA Client Interface
This allows the "irdma" driver to communicate with the ice(4)
driver to allow it access to the underlying device's hardware
resources as well as synchronize access to shared resources.

This interface already existed in the standalone out-of-tree
1.34.2 driver; this commit adds and enables it in the in-kernel
driver.

Note:

Adds hack to module Makefile to compile interface/.m files

These are required for the RDMA client interface, but they don't
build as-is like the normal .c files. The source directory doesn't
seem to be included by default, so add lines that specifically
add them as libraries so that ice_rdma.h can be found and the
interface files will compile.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D30889
2022-05-23 16:23:49 -07:00
Andrew Turner
ad52fba11e Add fdt to name of a fdt specific function
Rename pci_host_generic_attach to pci_host_generic_fdt_attach to be
consistant with the acpi attachment.

Sponsored by:	The FreeBSD Foundation
2022-05-23 15:24:35 +01:00
Navdeep Parhar
87c5ff0648 cxgbe/iw_cxgbe: c4iw_zero_addr should not use IN_ZERONET.
c4iw_zero_addr is supposed to check for all-zero addresses but was using
IN_ZERONET (which does something different) for IPv4 addresses.  Fix it
by simply checking for 0 as is done for IPv6 addresses.

Reported by:	karels@
MFC after:	3 days
Sponsored by:	Chelsio Communications
2022-05-19 15:55:08 -07:00
Hans Petter Selasky
527762b2f7 mlx4: Fix a memory leak bug.
In function mlx4_opreq_action(), pointer "mailbox" is not released,
when mlx4_cmd_box() return and error, causing a memory leak bug.
Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can
free this pointer.

Linux commit:
febfd9d3c7f74063e8e630b15413ca91b567f963

PR:		264056
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-05-19 10:13:06 +02:00
Michael Gmelin
ed87ff4e95 hidraw: Return string lengths for certain ioctls
Make HIDIOCGRAWPHYS, HIDIOCGRAWNAME, and HIDIOCGRAWUNIQ return
the length of the copied out string (including the trailing NUL
character), so they behave like their Linux hidraw counterparts.

Reviewed by:	wulf
Differential Revision:	https://reviews.freebsd.org/D35233
2022-05-18 12:12:19 +02:00
John Baldwin
12b37f8f9c cxgbe: Deactivate upper layer drivers (like TOE) during detach.
Reviewed by:	np
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D35237
2022-05-17 16:33:49 -07:00
Gleb Smirnoff
b46667c63e sockbuf: merge two versions of sbcreatecontrol() into one
No functional change.
2022-05-17 10:10:42 -07:00
Kevin Bowling
9b88ecd674 igc: Increase rx_buffer_size local variable to 32b
Apply 6987c47569 to igc. This is not
expected to have any benefit on current parts with current observed PBA
sizes but will avoid surprises if they are increased in future chips.

Approved by:	grehan
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D35217
2022-05-16 20:15:34 -07:00
Kevin Bowling
48a1a6be19 igc: Fix typo in PCI ID define usage
Reported by:	jenkins
Fixes:	bf0aa72f1f igc: Update PCI IDs
MFC after:	3 days
2022-05-15 16:17:49 -07:00
Kevin Bowling
bf0aa72f1f igc: Update PCI IDs
I226-K PCI ID got clarified by intel. Add a new I226 ID while here.

Approved by:	grehan
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D35218
2022-05-15 15:09:58 -07:00
Mitchell Horne
489ba22236 kerneldump: remove physical argument from d_dumper
The physical address argument is essentially ignored by every dumper
method. In addition, the dump routines don't actually pass a real
address; every call to dump_append() passes a value of zero for
physical.

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35173
2022-05-13 10:42:48 -03:00
Gleb Smirnoff
4581cffb3d sockets: fix build, convert missed sbreserve_locked() calls
Fixes:	4328318445
2022-05-12 14:29:19 -07:00
Gleb Smirnoff
4328318445 sockets: use socket buffer mutexes in struct socket directly
Since c67f3b8b78 the sockbuf mutexes belong to the containing socket,
and socket buffers just point to it.  In 74a68313b5 macros that access
this mutex directly were added.  Go over the core socket code and
eliminate code that reaches the mutex by dereferencing the sockbuf
compatibility pointer.

This change requires a KPI change, as some functions were given the
sockbuf pointer only without any hint if it is a receive or send buffer.

This change doesn't cover the whole kernel, many protocols still use
compatibility pointers internally.  However, it allows operation of a
protocol that doesn't use them.

Reviewed by:		markj
Differential revision:	https://reviews.freebsd.org/D35152
2022-05-12 13:22:12 -07:00
Kevin Bowling
6987c47569 e1000: Increase rx_buffer_size to 32b
Extend the size of the local rx_buffer_size variable to account for
larger buffer sizes possible on 82580, i350 chips.

From i350 datasheet, 6.2.10 Initialization Control 4 (LAN Base Address
+ Offset 0x13):
When 4 ports are enabled maximum buffer size is 36 KB. When 2 ports are
enabled maximum buffer size is 72 KB. When only a single port is
enabled maximum buffer size is 144 KB.

and 8.3:
The overall available internal buffer size in the I350 for all ports is
144 KB for receive buffers and 80 KB for transmit Buffers. Disabled
ports memory can be shared between active ports and sharing can be
asymmetric. The default buffer size for each port is loaded from the
EEPROM on initialization.

From the reporter:
But for I350 when only 2 ports are used PBA size can be set as 72KB
(see datasheet RXPbsize or e1000_rxpbs_adjust_82580 function in
e1000_82575.c). In this case calculating the rx_buffer_size overflows
as 0x0048 << 10 = 73728 or 0x12000 pushed into u16. It is then set as
0x2000 or 8192.

PR:		263896
Reported by:	hannula@gmail.com
Tested by:	hannula@gmail.com
Approved by:	markj
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D35167
2022-05-12 08:43:55 -07:00
John Baldwin
67eeba2682 tsec: Remove unused devclass argument to DRIVER_MODULE. 2022-05-10 10:21:39 -07:00
John Baldwin
bce4876eb4 sec: Remove unused devclass argument to DRIVER_MODULE. 2022-05-10 10:21:39 -07:00
John Baldwin
0018a3041d Remove unused sdiob_devclass. 2022-05-10 10:21:39 -07:00