Commit Graph

37527 Commits

Author SHA1 Message Date
Andreas Tobler
e65d6406fd Drop 'All rights reserved'
Replace hardcoded sizes by nitems and sizeof
2020-03-06 21:24:09 +00:00
Andreas Tobler
7cc4d41e40 - Drop 'All rights reserved'
- Replace hardcoded size by nitems
2020-03-06 21:21:01 +00:00
Navdeep Parhar
7ba6f5493d cxgbe/t4_tom: Do not uninitialize a toepcb that has not been initialized.
This fixes the following panic:
--- trap 0xc, rip = 0xffffffff80c00411, rsp = 0xfffffe0025192840, rbp = 0xfffffe0025192860 ---
vmem_xfree() at vmem_xfree+0xd1/frame 0xfffffe0025192860
tls_uninit_toep() at tls_uninit_toep+0x78/frame 0xfffffe0025192880
free_toepcb() at free_toepcb+0x32/frame 0xfffffe00251928a0
t4_connect() at t4_connect+0x3be/frame 0xfffffe0025192950
tcp_offload_connect() at tcp_offload_connect+0xa4/frame 0xfffffe0025192990
tcp_usr_connect() at tcp_usr_connect+0xec/frame 0xfffffe00251929f0
soconnect() at soconnect+0xae/frame 0xfffffe0025192a30
kern_connectat() at kern_connectat+0xe2/frame 0xfffffe0025192a90
sys_connect() at sys_connect+0x75/frame 0xfffffe0025192ad0
amd64_syscall() at amd64_syscall+0x137/frame 0xfffffe0025192bf0
fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0025192bf0
--- syscall (98, FreeBSD ELF64, sys_connect), rip = 0x8008e9d8a, rsp = 0x7fffffffc0f8, rbp = 0x7fffffffc130 ---

Reviewed by:	jhb@
MFC after:	3 days
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D23989
2020-03-06 19:56:12 +00:00
Leandro Lupori
c65f571c89 ixl: Add missing conversions from/to LE16
This fixes some errors on PPC64, during attach and when trying to assign an IP
to an interface.  With this change, basic operation of X710 NICs is now
possible.

This also fixes builds with IXL_DEBUG enabled

Reviewed by:	erj
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D23975
2020-03-06 12:37:04 +00:00
Stanislav Galabov
46abd6a27e Add Gigabit Ethernet support for RT3883 and RT2880 Ralink/Mediatek SoCs
Submitted by:	yamori813@yahoo.co.jp
Reported by:	yamori813@yahoo.co.jp
Reviewed by:	sgalabov, ray
Obtained from:	yamori813@yahoo.co.jp
Differential Revision:	https://reviews.freebsd.org/D22618
2020-03-06 08:50:18 +00:00
Justin Hibbits
b21fe1ab67 Fix a mistaken conditional in mfi_tbolt_send_frame()
As written, the condition of (cdb[0] != 0x28 || cdb[0] != 0x2A) will always
be true, since if it's one, it's obviously not the other.  Reading the code,
the intent appears to be that it should only perform the operation if it's
neither, otherwise the conditional can be elided.

Found by clang 10.
2020-03-06 01:50:15 +00:00
Leandro Lupori
d8c51c6f74 [aacraid] Port driver to big-endian
Port aacraid driver to big-endian (BE) hosts.

The immediate goal of this change is to make it possible to use the
aacraid driver on PowerPC64 machines that have Adaptec Series 8 SAS
controllers.

Adapters supported by this driver expect FIB contents in little-endian
(LE) byte order. All FIBs have a fixed header part as well as a data
part that depends on the command being issued to the controller.

In this way, on BE hosts, the FIB header and all FIB data structures
used in aacraid.c and aacraid_cam.c need to be converted to LE before
being sent to the adapter and converted to BE when coming from it.

The functions to convert each struct are on aacraid_endian.c.
For little-endian (LE) targets, they are macros that expand
to nothing.
In some cases, when only a few fields of a large structure are used,
the fields are converted inline, by the code using them.

PR:		237463
Reviewed by:	jhibbits
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D23887
2020-03-05 20:04:41 +00:00
Gleb Smirnoff
70b1e1c681 Remove unused function. 2020-03-04 22:31:41 +00:00
Emmanuel Vadot
c30e9beba0 dwmmc: Rework the DMA engine
Each segment can be up to 4096 bytes in chain structure according to the
RK3399 TRM Part 2.
Set the buffers in full ring where the last one point to the first one.
Correctly reports the MMC_IVAR_MAX_DATA.
Use CACHE_LINE_SIZE for bus_dma alignment.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D23894
2020-03-04 20:01:03 +00:00
Brooks Davis
ac09be5297 bnxt(4): Fix ioctls when user addresses are inaccessable.
Check copyin's error code (differ adding copyout checks at this time).

Don't directly access user memory in the switch statement.

Since bnxt_ioctl_data isn't all that big, use a stack allocation.

Reviewed by:	jhb
MFC after:	3 days
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23933
2020-03-04 17:55:57 +00:00
Hans Petter Selasky
cc1efc23c8 Implement a detaching flag for the sound(4) subsystem to take
appropriate actions when we are trying to detach an audio device,
but cannot because someone is using it.

This avoids applications having to wait for the DSP read data
timeout before they receive any error indication.
Tested with virtual_oss(8).

Remove some unused definitions while at it.

PR:		194727
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-03-04 17:23:20 +00:00
Konstantin Belousov
96dad2b720 mlx5en: Support 50GBase-KR4 media type in mlx5en driver.
Submitted by:	Adam Peace <adam.e.peace@gmail.com>
Reviewed by:	hselasky
Sponsored by:	Mellanox Technologies
MFC after:	1 week
2020-03-04 17:13:35 +00:00
Leandro Lupori
cffdc39e5e [aacraid] Add missing unmap call for SYNC mode
This issue was observed on a PowerPC64 machine with an Adaptec RAID Controller
with PCI device ID 0x028d. After several read/write operations, the kernel was
panic'ing in bus_dmamap_sync(). This was due to a missing aac_unmap_command()
in the SYNC path.

PR:	237463
Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D23668
2020-03-04 12:21:38 +00:00
Hans Petter Selasky
0e5670a9a0 Restart the USB keyboard repeat timer at every valid key-press.
This fixes a regression issue after r357861.

Reported by:	James Wright <james.wright@jigsawdezign.com>
PR:	224592
PR:	233884
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2020-03-04 09:46:42 +00:00
Justin Hibbits
5df2e54c42 Add Atom C3000 (Denverton) SMT PCI ID
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc
2020-03-03 22:23:56 +00:00
Brooks Davis
1b8b041ce9 Use ifr_data_get_ptr() consistently. 2020-03-03 18:58:43 +00:00
Emmanuel Vadot
a969e975c9 cpufreq_dt: Improve multiple opp support
When looking for cpu with the same OPP starts from the root /cpus node
so each instance of cpufreq_dt will now each cpu with the same operating
point.
Also test that the node we are testing have the property "device_type" set
to be equal to "cpu".
While here add more debug printfs (off by defaults).

MFC after:	2 weeks
2020-03-02 21:19:51 +00:00
Ed Maste
2495ef28e9 Add deprecation notices to ctau and cx drivers
These support outdated or obsolete ISA WAN (T1/E1) sync serial cards,
and these drivers haven't really been touched (other than in tree-wide
sweeps to keep them building) for 15+ years.

Related PCI devices ce and cp are still in the tree, with deprecation
proposed in D23928.

MFC after:	1 week
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2020-03-02 20:14:27 +00:00
Leandro Lupori
967c53ac2f [aacraid] Prevent sense data from causing a buffer overflow
This issue was observed on a PowerPC64 machine with an Adaptec RAID
Controller with PCI device ID 0x028d, where sense data was causing a
buffer overflow because of wrong max sense length logic.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D23667
2020-03-02 16:11:25 +00:00
Hans Petter Selasky
543b9d5960 Expose the ACPI power button, sleep button and LID state as evdev's.
This allows libinput to disable touchpads when the lid is closed and
various desktop environments can show power-off dialogs when the power
button is pressed. While the latter is doable with devd a
cross-platform solution is nicer.

Submitted by:	Greg V <greg@unrelenting.technology>
Differential Revision:	https://reviews.freebsd.org/D23863
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-03-02 09:45:06 +00:00
Warner Losh
795140556c Remove bktr(4)
Remove the brooktree driver as discussed on arch@. Bump FreeBSD version to
1300082, though I doubt anything will care.

Relnote: yes
2020-03-01 19:15:03 +00:00
Xin LI
5082c36629 Fix build. 2020-03-01 18:55:59 +00:00
Warner Losh
a11c38d321 Remove noise that once upon a time allowed netback to build on FreeBSD 6. The
network layer has evolved since then, and this won't compile there.
2020-03-01 18:18:11 +00:00
Warner Losh
5f8395cce4 Remove FreeBSD 8 support from virtio.
The sbuf API has evolved since 8, as have many others. The other API sweeps
didn't make the changes conditional, so this is now noise.
2020-03-01 18:18:07 +00:00
Warner Losh
6773051162 Remove support for FreeBSD 4-7 from the iscsi initiator.
Also, inline/remove now empty or trivial macros. CAM has evolved enough this
code couldn't work there anyway, and the API sweeep commits made since then were
made unconditional.
2020-03-01 18:18:01 +00:00
Warner Losh
1a1b54589b Remove conditional code for FreeBSD 8 and earlier frmo cxgb. 2020-03-01 18:17:56 +00:00
Warner Losh
eab6ecc0ae Finish removing support from old versions
Eliminate code for old versions, inline pci_find_cap instead of relying on
compat ifdef.

This commit should have been combined with r358488 before pushing it in.
2020-03-01 18:17:51 +00:00
Warner Losh
e602f0c85d Remove FreeBSD 7-10 support from bxe driver.
Use new PCIER and PCIEM names in the driver rather than relying on old, compat
shims.
2020-03-01 17:46:28 +00:00
Warner Losh
fb2e3c49e1 Remove support for FreeBSD 8 systems. These workarounds and ways of rescanning
devices are no longer done.
2020-03-01 17:27:35 +00:00
Warner Losh
55e306cb12 Remove all the compatibility hacks for systems that predate FreeBSD 8. Some of
these look to be cut and pasted from other drivers since this driver was
committed to FreeBSD 7-current and MFC'd to FreeBSD 6. The ones for FreeBSD 4
and 5 likely never were working...
2020-03-01 17:27:30 +00:00
Warner Losh
246da17ee5 Remove compatibility code for changing sysctl definitions for pre FreeBSD 9
versions. These are just noise these days.
2020-03-01 17:27:25 +00:00
Warner Losh
27dc15d2f6 Remove FreeBSD 7 conditional code... We've had a lot of other changes since then
and al_eth appears only in the Annapurna ARM designs which arrived in the tree
after that.
2020-03-01 16:45:54 +00:00
Warner Losh
9ea5bef27f Remove support for varios versions from FreeBSD 4 to 8.
There's no way arcmsr will still work on those versions. Cleanup really old code
that's no longer needed.
2020-02-29 22:16:27 +00:00
Warner Losh
94c1cb8c3d add deprecation notice for bktr driver.
We plan to remove bktr(4) in FreeBSD 13. Document that here.

Relnotes: yes
2020-02-29 21:50:08 +00:00
Emmanuel Vadot
d5151ea87a mmc: dwmmc: Fix off by one error
The IVAR_MAX_DATA is supposed to have the number of descriptor X the mmc
block size and desc_count contain all this information + 1.

Reported by:	phk
MFC after:	1 week
2020-02-28 21:31:40 +00:00
Jeff Roberson
7aaf252c96 Convert a few triviail consumers to the new unlocked grab API.
Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D23847
2020-02-28 20:34:30 +00:00
Justin Hibbits
f37cc7137d Add Denverton UART PCI ID
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc
2020-02-28 15:59:35 +00:00
John Baldwin
6d44e8e6b5 Rename TOE TLS stats from [rt]x_tls_* to [rt]x_toe_tls_*.
This more clearly differentiates TLS records encrypted and decrypted
in TOE connections from those encrypted via NIC TLS.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2020-02-28 00:42:27 +00:00
Hiroki Sato
28180b6298 Add MODULE_PNP_INFO() to autoload the rtwn_pci(4) kernel module.
Reviewed by:	imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D23807
2020-02-27 19:35:17 +00:00
Hiroki Sato
ff29a95213 Add workaround for models which do not follow the ACPI specification strictly.
Extra objects are now simply ignored instead of rejecting everything.
2020-02-27 17:13:57 +00:00
Warner Losh
e07d0aae4a Remove FreeBSD 4 support 2020-02-27 15:25:31 +00:00
Warner Losh
a9208e9862 Remove FreeBSD 7-9 support from oce
Use newer pci_find_cap API now that the need to remap the old API is gone.
2020-02-27 15:25:26 +00:00
Warner Losh
adc1d71c8b Remove support for FreeBSD 7 and 8
Also, unifdef -DSFXGE_HAVE_DESCRIBE_INTR since it's now always defined.
2020-02-27 15:25:21 +00:00
Pawel Biernacki
4312ebfe0b Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (18 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Mark all obvious cases as MPSAFE.  All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT

Reviewed by:	cem
Approved by:	csprng, kib (mentor, blanket)
Differential Revision:	https://reviews.freebsd.org/D23841
2020-02-27 13:12:14 +00:00
Warner Losh
2a12053589 Remove support for FreeBSD 4-7.
It's doubtful this driver would still work unchanged there.
Compile tested only because I no longer have ahc/ahd devices.
2020-02-26 19:39:59 +00:00
Warner Losh
4f8959b9f4 Remove support for FreeBSD 4.x and earlier from agp driver
Compile tested only, but do we still need this driver?
2020-02-26 19:39:52 +00:00
Warner Losh
0d87f3c702 Remove support for all pre FreeBSD 11.0 versions from mpr and mps.
Remove a number of workarounds for older versions of FreeBSD. FreeBSD stable/10
was branched over 6 years ago. All of these changes date from about that time or
earlier. These workarounds are extensive and get in the way of understanding
the current flow in the driver.
2020-02-26 19:15:08 +00:00
Pawel Biernacki
7029da5c36 Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Mark all obvious cases as MPSAFE.  All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT

Approved by:	kib (mentor, blanket)
Commented by:	kib, gallatin, melifaro
Differential Revision:	https://reviews.freebsd.org/D23718
2020-02-26 14:26:36 +00:00
Brandon Bergren
f55185bcd8 [PowerPC] [Book-E] Remove obsolete interrupt binding workaround
Remove an old workaround that is no longer necessary since rS343824.

There used to be a problem with FMan interrupts firing on multiple CPUS
at the same time.

This ended up being due to multicast interrupts being unsupported in the
Freescale PIC (so instead of using a selection algorithm, it would do some
unspecified action, such as interrupting multiple cpus at random.)

Reviewed by:	jhibbits
Sponsored by:	Tag1 Consulting, Inc.
Differential Revision:	https://reviews.freebsd.org/D23829
2020-02-25 22:03:30 +00:00
Pawel Biernacki
41fc1ce14c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (16 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Mark all obvious cases as MPSAFE.

Reviewed by:	royger
Approved by:	kib (mentor, blanket)
Differential Revision:	https://reviews.freebsd.org/D23638
2020-02-25 19:04:39 +00:00