Define the last missing PN length and for consistency use them
in struct ieee80211_key_seq (even though a 6 is a 6 is a 6).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Use %b with IEEE80211_KEY_BITS for the debug logging in
ieee80211_crypto.c rather than just printing the hex value, which
makes some of the messages more obvious and avoids having the header
file next to one at all times.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D49369
Instead of passing -1 to the function in ieee80211_crypto_demic(),
use the defined IEEE80211_KEYIX_NONE.
net80211 uses ieee80211_keyix not u_int as type for the key index
internally. Use that. This also helps when printing the -1 unsigned
as it stays within the expected numerical scope and makes the debug
message more readable.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D49368
Not only are some of the bits missing, \4 and following were also
off-by-one. Correct that so we can use them instead of reading
hex numbers.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D49366
This is a cosmetic change affecting the "plugged: ..." line in the
output of ifconfig -v. Both the 100G active cables were missing a
closing parenthesis.
MFC after: 1 week
Sponsored by: Chelsio Communications
After commit 389a3fa693, uma_reclaim_domain(UMA_RECLAIM_DRAIN_CPU)
calls uma_zone_reclaim_domain(UMA_RECLAIM_DRAIN_CPU) twice on each zone
in addition to globally draining per-CPU caches. This was unintended
and is unnecessarily slow; in particular, draining per-CPU caches
requires binding to each CPU.
Stop draining per-CPU caches when visiting each zone, just do it once in
pcpu_cache_drain_safe() to minimize the amount of expensive sched_bind()
calls.
Fixes: 389a3fa693 ("uma: Add UMA_ZONE_UNMANAGED")
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: gallatin, kib
Differential Revision: https://reviews.freebsd.org/D49349
Event codes are expected to be retrieved from a queue on at least some
models. Specifically, very likely the ACPI WMI devices with _UID ATK are
queued whereas those with ASUSWMI are not.
Sponsored by: Future Crew LLC
MFC after: 1 month
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D48984
- Fix maximal keyboard backlight level, Although Linux source code
comment says that backlight level is encoded in 3 bits of data,
actual code limits maximum level to 3.
- Add backlight(9) support for keyboard
- Turn off/on keyboard backlight on suspend/resume
Sponsored by: Future Crew LLC
MFC after: 1 month
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D48983
Only set the GETMAXLUN quirk when it causes an error, but don't set it
when it returns 0. Since we reset the device when we set any quirk, only
set this quirk when it generates an error so umass will avoid it. When
the command works, there's no reason for umass to avoid it at all.
MFC After: 1 week
Sponsored by: Netflix
So the problem is that the lua parser in /boot/lua/config.lua is
splitting the line on the '=', sending the first match to the key and
the second to the value.
In the problem case, the value is:
'"test b" # This is "test_directive_b"'
Then the value gets matched against QVALEXPR = '"(.*)"'.
This cleans up the value by removing the first and last '"', but in this
case turns it into:
test b" # This is "test_directive_b
which then gets rejected in processEnvVar() with MSG_FAILSYN_QUOTE,
since values aren't allowed to contain '"'.
Changing QVALEXPR to '([-%w_]+)' fixes this problem. Since the value is
explicitly prevented from containing quotes, it's not unreasonable to
load it from an expression that excludes them. The only other place
this is used is in the 'exec="command"' expression, which also should
not contain '"' in the command value.
PR: 265001
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D35975
I have several of these. They all work without these quirks (either the
auto quirk mechanism does the right thing, or a likely
soon-to-be-removed vendor catch-all does the right thing, or no probing
at all does the right hting).
Both PREVENT ALLOW and SYNCHRONIZE CACHE are (a) unimplemented but (b)
return the proper asc/ascq code so da just does the right thing, quirk
or no. This was a left-over from the days where you'd get scary error
messages, but we'd work just fine. Now that the scary error messages are
gone (and only a calm one under bootverbose), this can be deleted.
Sponsored by: Netflix
We only try to do a GETMAXLUN query of BBB devices. If we're forcing the
device to be CBI, then it's not BBB. Delete the quirks from there. Also,
UFI devices are all CBI as well, so remove the quirk from there as well.
Confirmed this isn't needed with three different floppy disk drives I
have.
Sponsored by: Netflix
The driver uses bus_reset_child on its parent to reset itself but that
performs an FLR whereas the hardware needs a Conventional Reset[1] for
full re-initialization. Add routines that perform conventional hot
reset and use them instead. The available reset mechanisms are:
* PCIe secondary bus reset (default)
* PCIe link bounce
hw.cxgbe.reset_method can be used to override the default. The internal
PL_RST is also available but is for testing only.
[1] 6.6.1 in PCI Express® Base Specification 5.0 version 1.0
MFC after: 1 month
Sponsored by: Chelsio Communications
NDR(106.25 Gbps) support exposed new data rates:
800 Gbps - NDR 8x.
1200 Gbps - NDR 12x.
Utility methods were updated to support the new rates mentioned above:
1) Rate to mult - Convert the IB rate enum to a multiple of 2.5 Gbps.
2) Rate to mbps - Convert IB rate enum to the mbps value.
In addition, speed_str() of ibv_devinfo was updated to consider the new
NDR rate.
Reference: IB Spec Release 1.5
PR: 285305
MFC after: 1 week
Sponsored by: NVidia networking
Change-Id: I77541e406f700585fbfeddc162d5a0e7b79a1c11
Signed-off-by: Slava Shwartsman <slavash@nvidia.com>
vnode_pager_generic_getpages() and swap_pager_getpages_locked() each
include code to read a few pages behind, and a few pages ahead of, a
specified page range. The same code can serve each function, and that
code is encapsulated in a new vm_object_page function. For the swap
case, this also eliminates some needless linked-list traversal.
Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D49224
wlanstats prints the wrong usage statement, including a nonexistent -a
flag (*) and a description of -m that suggests multiple arguments.
Make the manpage slightly more clear.
(*) the implementation of that is #if 0 and the option was disabled
in 530c13c540.
Sponsored by: The FreeBSD Foundation (commit)
PR: 285413
MFC after: 3 days
Reviewed by: ziaee
Differential Revision: https://reviews.freebsd.org/D49365
On some EC2 instances, there is a race between removing a device from
the system and making the PCI bus stop reporting the presence of the
device. As a result, a PCI BUS_RESCAN performed immediately after
the _EJ0 method returns "sees" the device which is being ejected, which
then causes problems later (e.g. we won't recognize a new device being
plugged into that slot because we never knew it was vacant).
On other operating systems the bus is synchronously marked as needing
to be rescanned but the rescan does not occur until O(1) seconds later.
Create a new ACPI_Q_DELAY_BEFORE_EJECT_RESCAN quirk and set it in EC2
AMIs, and add a 10 ms DELAY between _EJ0 and BUS_RESCAN when tht quirk
is set.
Reviewed by: jhb
MFC after: 1 month
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D49252
Starting in 2014 FreeBSD migrated from GNU binutils to ELF Tool Chain
tools. At that time there were no usable LLVM versions of those tools,
but they have been developing rapidly since then. Migrate to LLVML's
tools for both functionality and maintainability reasons.
This will eventually support the use of link-time optimization (LTO) in
the FreeBSD base system. LTO runs optimization passes over the entire
executable (or library) at link time and thus allows for more effective
optimization than when performed on individual compilation units.
When using LTO object files (.o) including those contained in static
library archives (.a) contain LLVM IR bitcode rather than target
object code. This means that utilities that operate on object files
need to support LLVM IR.
As with ELF Tool Chain the LLVM tools aim for command line and output
format compatibility with GNU binutils, although there are a few minor
differences. Where these cause a material issue (breaking a port or
eliminating required functionality) we can submit LLVM bugs and work
on patches.
PR: 258872 (exp-run)
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49361
A FreeBSD specific comment asked people to report to a PR if they see
this. By now we got enough feedback and also left this in a release.
Simply point to the PR so people can check the status but not longer
ask to submit a report to the PR.
Sponsored by: The FreeBSD Foundation
PR: 274382
MFC after: 3 days
According to Documentation/core-api/dma-api.rst kmalloc() is supposd
to provide physically contiguous memory. [1]
In order to guarantee that allocations are contiguous even if using
PAGE_SIZE or larger check the size and use contigmalloc if needed.
This makes use of 9e6544dd6e (and following) allowing free(9) to
also work for contigmalloced memory.
Sponsored by: The FreeBSD Foundation
Pointed out by: jhb [1]
Reviewed by: jhb, emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D46656
In linux_alloc_kmem() [used by *get_page*()] we always at least allocate
PAGE_SIZE and we want the allocation to be contiguous so it can be passed
to DMA. Always use kmem_alloc_contig() and only change the low argument
depending on the GFP_DMA32 flag being given or not.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: jhb, dumbbell
Differential Revision: https://reviews.freebsd.org/D46661
With the last commit to refill the rx mbuf in batch, the doorbell
in mana_poll_rx_cq() becomes redundant. Remove it to save a few
microseconds spent in mmio call.
Reported by: NetApp
Reviewed by: Tallamraju, Sai
Tested by: whu
Fixes: 9b8701b8 ("mana: refill the rx mbuf in batch")
MFC after: 3 days
Sponsored by: Microsoft
The following panic was the result of running "cdcontrol eject" after
using the physical ejection key on the device before the tray was
actually ejected. So we have hardware racing software.
The device was loaded with a DVD.
Resulted in a NULL pointer dereference
g_dev_orphan() at g_dev_orphan+0x2e/frame 0xfffffe01eba0a9f0
g_resize_provider_event() at g_resize_provider_event+0x71/frame 0xfffffe01eba0aa20
g_run_events() at g_run_events+0x20e/frame 0xfffffe01eba0aa70
fork_exit() at fork_exit+0x85/frame 0xfffffe01eba0aab0
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe01eba0aab0
Avoid this possibility and return early of dev is NULL already.
PR: 215856
Reviewed by: imp (I've triggered this once or twice over the years too)
Sponsored by: Netflix
if_rtwn.4 was previously removed, but actually it is correct because
the interfaces is called rtwn.
Fixes: 4262dbc579
MFC after: 3 days
Reported by: bz
Approved by: mhorne (mentor)
Differential Revision: https://reviews.freebsd.org/D49323
Redirect sound to headphone jack when plugged in.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D49346
This check was in place to aid the transition from sendmail pre-8.10.
8.10 was released in 2000. It's not possible to upgrade directly from
such as system (Freebsd 3?) to FreeBSD 15 so we can drop this.
Reviewed by: gshapiro, jhb
Differential Revision: https://reviews.freebsd.org/D49308
Print pointers to locks instead of their names to avoid a nested panic
if the lock object is corrupted.
Reviewed by: markj
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D49331
This very theoretical edge case was discovered by Coverity, not sure if
it was introduced by 2af953b132 or was there before.
CID: 1593695
Fixes: 2af953b132
Remove redundant includes like sys/types.h and sys/param.h due to
sys/systm.h. Sort alphabetically.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D49163