Commit Graph

41550 Commits

Author SHA1 Message Date
Justin Hibbits
8d5feede40 IfAPI: Finish changes of ice(4).
Reviewed by:	erj
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38423
2023-02-14 10:21:19 -05:00
Justin Hibbits
e330262f34 Mechanically convert netmap(4) to IfAPI
Reviewed by:	vmaffione, zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37814
2023-02-14 10:21:19 -05:00
Justin Hibbits
4366ea339d mlx4: Finish conversion to IfAPI
Fix a few stragglers found with further IfAPI work.

Sponsored by:	Juniper Networks, Inc.
2023-02-14 10:21:19 -05:00
Justin Hibbits
b29549c7f9 etherswitch: Fix leftovers from IfAPI conversion
Sponsored by:	Juniper Networks, Inc.
2023-02-14 10:21:18 -05:00
Stefan Eßer
f20058955c sys/kbio.h: make pre-unicode keymap support optional
FreeBSD-9 had introduced support for the full set of Unicode
characters to the parsing and processing of keymap character tables.

This support has been extended to cover the table for accented
characters that are reached via dead key combinations in FreeBSD-13.2.

New ioctls have been introduced to support both the pre-Unicode and
the Unicode formats and keyboard drivers have been extended to support
those ioctls.

This commit makes the ABI compatibility functions in the kernel
optional and dependent on COMPAT_FREEBSD13 in -CURRENT.

The kbdcontrol command in -CURRENT and 13-STABLE (before 13.2) has
been made ABI compatible with old kernels to allow a new world to be
run on an old kernel (that does not have full Unicode support for
keymaps).

This commit is not to merged back to 12-STABLE or 13-STABLE. It is
part of review D38465, which has been split into 3 separate commits
due to different MFC and life-time requirements of either commit.

Approved by:	imp
Differential Revision:	https://reviews.freebsd.org/D38465
2023-02-14 14:03:28 +01:00
Piotr Kubaj
8923de5905
ice(4): Update to 1.37.7-k
Notable changes include:

- DSCP QoS Support (leveraging support added in
  rG9c950139051298831ce19d01ea5fb33ec6ea7f89)
- Improved PFC handling and TC queue assignments (now all remaining
  queues are assigned to TC 0 when more than one TC is enabled and the
  number of available queues does not evenly divide between them)
- Support for dumping the internal FW state for additional debugging by
  Intel support
- Support for allowing "No FEC" to be a valid state for the LESM to
  negotiate when using non-standard compliant modules

Also includes various bug fixes and smaller enhancements, too.

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

Reviewed by:	erj@
Tested by:	Jeff Pieper <jeffrey.pieper@intel.com>
MFC after:	3 days
Relnotes:	yes
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D38109
2023-02-13 17:29:44 -08:00
Mateusz Guzik
5173c996bc psm: ansify
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-02-13 18:38:49 +00:00
Mateusz Guzik
aa0b46948e speaker: ansify
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-02-13 18:28:09 +00:00
Mitchell Horne
afca197f52 ofwbus: only allow unit number zero
ofwbus has always been the root of attachment for OFW/FDT platforms. It
may have simplebus children, but we expect only one instance of the
ofwbus driver, added directly by nexus. We may as well ensure this
remains the case.

Reviewed by:	jhb
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D38493
2023-02-13 13:45:01 -04:00
Mitchell Horne
53d5e65eea ofwbus: remove arm64 ifdefs
Rather than using the DEVICE_IDENTIFY method, let's have other
ofwbus-using platforms add ofwbus0 explicitly in nexus, like arm64. This
gives them the same flexibility, e.g. if riscv starts supporting ACPI,
and cleans up the #ifdefs.

We were doing this already on riscv, but adjust the 'order' parameters.

Reviewed by:	andrew, jhb
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D38492
2023-02-13 13:45:01 -04:00
Mitchell Horne
99553344e9 ofwbus: trim includes
Nothing in the file today relies on these.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D38491
2023-02-13 13:45:01 -04:00
Mateusz Guzik
16d10ee023 lge: ansify
Reported by:	clang 15
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-02-12 21:38:11 +00:00
Michael Paepcke
08ecb40e88 u3g: add huawei device id
Add missing entry for E3372h Model already in NCM mode

Noticed by: David BOYER
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/645
2023-02-10 16:29:54 -07:00
Jung-uk Kim
47131a3278 cxgbe: fix module loading
After c034143269, if_cxgbe.ko fails to load if crypto is not compiled
in kernel, e.g., MINIMAL.

link_elf_obj: symbol hmac_init_ipad undefined
linker_load_file: /boot/kernel/if_cxgbe.ko - unsupported file type
kldload: an error occurred while loading module if_cxgbe. Please check dmesg(8) for more details.

Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D38482
2023-02-10 13:27:20 -05:00
Mariusz Zaborski
346483b1f1 ahci: increase timout
For some devices, like Marvell 88SE9230, it takes more time
to connect to the device. This patch introduces a special flag
that extends the timeout from around 100ms to around 500ms.

This change is based on the work of: Peter Eriksson <pen@lysator.liu.se>

PR:		243401
Reviewed by:	imp
Tested by:	dch
MFC after:	3 days
Sponsored by:	Equinix
Sponsored by:	SkunkWerks, GmbH
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D38413
2023-02-10 17:10:04 +01:00
Mitchell Horne
1029dab634 mi_switch(): clean up switch types and their usage
Overall, this is a non-functional change, except for kernels built with
SCHED_STATS. However, the switch types are useful for communicating the
intent of the caller.

1. Ensure that every caller provides a type. In most cases, we upgrade
   the basic yield to sched_relinquish() aka SWT_RELINQUISH.
2. The case of sched_bind() is distinct, so add a new switch type SWT_BIND.
3. Remove the two unused types, SWT_PREEMPT and SWT_SLEEPQTIMO.
4. Remove SWT_NONE altogether and assert that callers always provide
   a type flag.
5. Reference the mi_switch(9) man page in the comments, as these flags
   will be documented there.

Reviewed by:	kib, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38184
2023-02-09 12:01:32 -04:00
Kevin Bowling
905ae5881b e1000: Add support for future client platforms
MFC after:	2 weeks
Sponsored by:	BBOX.io
2023-02-08 18:14:41 -07:00
Kevin Bowling
5636590214 e1000: Fix packet loss on 11th gen and later
Ungate DMA clock on TGP and later to avoid packet loss.

A similar fix appears in Linux 639e298f432fb058a9496ea16863f53b1ce935fe

This may be needed as far back as SPT but no confirmation from intel or
other OS yet.

Obtained from:	OpenBSD (if_em_hw.c 1.116)
MFC after:	2 weeks
Sponsored by:	BBOX.io
2023-02-08 17:50:33 -07:00
Kevin Bowling
d36fbdb08f e1000: Remove redundant disable_ulp for ich8lan
This call only makes sense for ich8lan, and the shared code does it in
e1000_setup_init_funcs() above this deletion.

Obtained from:	DPDK
MFC after:	2 weeks
Sponsored by:	BBOX.io
Pull Request:	https://github.com/freebsd/freebsd-src/pull/539
2023-02-08 17:24:28 -07:00
Vincenzo Maffione
fa3f665542 netmap: drop redundant if_mtu assignment
Reported by:	zlei
MFC after	3 days
2023-02-08 21:05:32 +00:00
Elliott Mitchell
f9bdaab95e ofwbus: remove handling of resources from ofwbus
The architecture nexus should handle allocation and release of memory and
interrupts. This is to ensure that system-wide resources such as these
are available to all devices, not just children of ofwbus0.

On powerpc this moves the ownership of these resources up one level,
from ofwbus0 to nexus0. Other architectures already have the required
logic in their nexus implementation, so this eliminates the duplication
of resources. An implementation of nexus_adjust_resource() is added for
arm, arm64, and riscv.

As noted by ian@ in the review, resource handling was the main bit of
logic distinguishing ofwbus from simplebus. With some attention to
detail, it should be possible to merge the two in the future.

Co-authored by:	mhorne
MFC after:	1 month
Differential Revision: https://reviews.freebsd.org/D30554
2023-02-08 16:50:46 -04:00
Kevin Bowling
647f2d2bc0 e1000: bump driver version
Incrementing these to avoid confusion in users; we are on par with these
out of tree versions.

Reviewed by:	erj
MFC after:	2 weeks
Sponsored by:	BBOX.io
Pull Request:	https://github.com/freebsd/freebsd-src/pull/540
2023-02-08 12:30:35 -07:00
Kevin Bowling
ae1dca798e e1000: fix I219 hang on reset
Clear the rings before reset to avoid a HW hang.

Inspired by em-7.7.8 and DPDK (1fc9701238edcf0541289b9ae15565b6d9d7ab30)

Reviewed by:	erj
MFC after:	2 weeks
Sponsored by:	BBOX.io
Pull Request:	https://github.com/freebsd/freebsd-src/pull/540
2023-02-08 12:30:34 -07:00
Doug Moore
87d405eab9 iommu_gas: initialize start_gap as first node
In iommu_gas.c, domain->start_gap points to one of the nodes on either
side of the first free, unallocated range. In iommu_gas_init_domain,
it is initialized to point to the node after the single free
range. Change it to point to the node before that free range, so that,
when 'lowaddr' is within the initial free range, the first allocation
search for free space below 'lowaddr' does not begin and end at an
address above 'lowaddr'. This fixes problems on a machine with Intel
DMAR enabled.

Reported by:	jah
Reviewed by:	dougm
Tested by:	jah
Obtained from:	jah
Fixes:	commit db151ca0c3 iommu_gas: start space search from 1st free space
MFC after:	1 day
2023-02-08 11:04:13 -06:00
Adrian Chadd
2e9d05fd68 asmc: Add support for 10 byte light sensor payloads; MacBookAir6,1
The later macbook models use a different packet payload for the light
sensors:

* There's only one, done in the camera
* It's a 4 byte sensor value, not a 2 byte value
* It's in a 10 byte payload.

So, this adds support for that and flips it on for the MacbookAir6,2.

It also adds support for MacBookAir6,1 as that now works fine here.

Tested - MacBookAir6,1 and 6,2

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D38365
2023-02-08 04:06:16 +00:00
Mateusz Guzik
82c519c21f sk: ansify
Reported by:	clang 15
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-02-08 00:05:03 +00:00
Mateusz Guzik
bef67a0f15 mvneta: add the missing include opt_mvneta.h
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-02-07 19:20:05 +00:00
Justin Hibbits
b34a60c54f Mechanically convert vtbe(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37844
2023-02-07 14:16:18 -05:00
Justin Hibbits
37d22ce087 Mechanically convert mana to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37835
2023-02-07 14:16:18 -05:00
Justin Hibbits
67fd4c9d07 Mechanically convert oce(4) to IfAPI
Reviewed By:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37829
2023-02-07 14:16:17 -05:00
Justin Hibbits
2c50292d06 Mechanically convert liquidio(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37828
2023-02-07 14:16:17 -05:00
Justin Hibbits
b9545c5794 Mechanically convert vnic to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37827
2023-02-07 14:16:17 -05:00
Justin Hibbits
0b2813768b Mechanically convert mlx4(4) to IfAPI
Reviewed by:	hselasky, zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37823
2023-02-07 14:16:11 -05:00
Justin Hibbits
04abf87b2a Mechanically convert sfxge(4) to IfAPI
Reviewed by:	arybchik, zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37817
2023-02-07 14:15:49 -05:00
Justin Hibbits
cc970676d2 Mechanically convert if_sume(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37808
2023-02-07 14:15:49 -05:00
Justin Hibbits
08ca347fc7 Mechanically convert stge(4) to IfAPI
Reviewed By:	zlei, melifaro
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37807
2023-02-07 14:15:48 -05:00
Justin Hibbits
2fda7967b6 Mechanically convert usb_ethernet(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37802
2023-02-07 14:15:45 -05:00
Justin Hibbits
dba12f7560 Mechanically convert if_xae to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37797
2023-02-07 14:15:04 -05:00
Justin Hibbits
b4ad37f693 Mechanically convert atse(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37795
2023-02-07 14:15:04 -05:00
John Baldwin
e396612511 cxgbe T6 KTLS: Use intotcpcb().
Fixes:		e68b379244 tcp: embed inpcb into tcpcb
Sponsored by:	Chelsio Communications
2023-02-06 17:07:53 -08:00
Stefan Eßer
4972fb9276 Support Unicode characters in keymap dead key tables
Support for Unicode characters had been added to the keyboard code,
but there are keymaps that have accented characters accessed via dead
key combinations, and those were still restricted to 8 bit codes.

This update to kbd.c adds support for Unicode characters and
compatibility code that allows a kbdcontrol command built from kbio.h
without these patches to work on a new kernel.

Compatibility code that allows a new kbdcontrol binary running on an
old kernel to load and display the dead key map will be committed in a
separate commit.

Reviewed by:	imp, brooks
Approved by:	brooks
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D38381
2023-02-06 23:48:47 +01:00
Bartosz Sobczak
a527c18cd7
irdma(4): Add code for compilation on stable/13 branch
Current content of the irdma(4) driver consists only of code that is
compilable on current 14-CURRENT branch which makes it impossible to
merge into stable/13 branch because of missing dependencies in the ofed
tree.

This patch adds missing code that allows for merging into stable branch.
Once it is there, code relating only to version 14 or higher should be
removed.

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

Reviewed by:	erj@
MFC after:	1 day
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D38170
2023-02-06 14:37:39 -08:00
Piotr Kubaj
c0548bfc3a
em(4): Add IDs for new Intel(R) I219 devices
These include I219 (20) through I219 (23), which ends at Raptor Lake.

This also corrects a discrepancy where the (16) devices should be
mac type "e1000_pch_tgp" and not "e1000_pch_adp".

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

PR:		269224
Reviewed by:	erj@
MFC after:	1 day
Relnotes:	yes
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D38376
2023-02-06 14:35:56 -08:00
John Baldwin
70efe1a2fe ccr,ccp: Fix argument order to sglist_append_vmpages.
The offset comes before the byte count.

Reported by:	br
Reviewed by:	asomers, markj
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38375
2023-02-06 13:51:57 -08:00
Doug Ambrisko
bbd354cb23 enic: convert to IfAPI
Prompted by:	jhibbits
2023-02-06 13:19:48 -08:00
Justin Hibbits
96ab5e7199 mge(4): Fix build after IfAPI conversion
Fixes:		98fe10c8fc
Sponsored by:	Juniper Networks, Inc.
2023-02-06 15:56:22 -05:00
Justin Hibbits
932370ddd4 sbni(4): Fix i386 build
Fixes:		3fba06ad
Sponsored by:	Juniper Networks, Inc.
2023-02-06 15:56:22 -05:00
Justin Hibbits
d8b78838c5 tsec(4): Fix the build from IfAPI conversion
Fixes:		47842ecfe
Sponsored by:	Juniper Networks, Inc.
2023-02-06 15:23:52 -05:00
Justin Hibbits
655d043b49 Remove gxemul drivers.
These were MIPS-only.
2023-02-06 13:06:25 -05:00
Justin Hibbits
93037a67bf Mechanically convert mxge(4) to IfAPI
Reviewed by:	gallatin
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37848
2023-02-06 12:52:46 -05:00