| Age | Commit message (Collapse) | Author |
|
In order to enable RX checksum offloading we need to check the
meta-information for the (good) frames to see if the L3/4 checksums
were calculated and if there was an error.
The way the buffere are setup, the needed frame meta-information is
already requested. All we have to do is make sure it is really part
of the RX frame, that it is valid, and if the respective bits are set.
Also do not forget to set the (dummy) csum_data as otherwise upper
layers will just be cranky. An artefact of the past which likely
should disappear.
PR: 292006
Reviewed by: bz, tuexen
Tested by: bz, tuexen
Approved by: tuexen
Obtained from: bz (initial version, D55320)
MFC after: 3 days
Sponsored by: Traverse Technologies (providing Ten64 HW for testing)
Differential Revision: https://reviews.freebsd.org/D56383
|
|
- s/Inititalize/Initialize/
MFC after: 3 days
|
|
This reverts commit 602249f033d146d9c731d8b1cb4b2e0899c61ad9.
|
|
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
|
Should have been part of the previous commit (but PEBCAK).
Reviewed by: obiwac
Fixes: bd05b47fbd8b ("acpi_spmc(4): Small probe improvements/fixes")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56483
|
|
Remove the test on presence of an ACPI handle, this is implied by
ACPI_ID_PROBE() succeeding.
Set 'sc->dev' early, so that acpi_spmc_check_dsm_set() using
device_printf() will print the driver name.
Add a missing newline after printing that more DSM functions are
implemented then expected.
Reviewed by: obiwac
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56483
|
|
For PCI devices listed in pci_ns8250_ids return BUS_PROBE_SPECIFIC, while
for generic UART devices not explicitly listed in pci_ns8250_ids return
BUS_PROBE_GENERIC. This allows more specific drivers to take over those
devices, and the generic UART PCI driver will only be used as a fallback.
This fixes an issue where the UART PCI driver would attach to multiport PCI
UART devices, that instead need to use the puc(4) driver to multiplex the
device.
Reported by: markj
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D56467
Reviewed by: markj imp
|
|
When the Alder Lake Serial-over-LAN device is put into loopback mode and
repeated writes are performed to the data register it results in the device
ending up in a non-functional state afterwards.
Recovering the device to a working state requires re-writing the LCR
register with it's current value (no effective change). This should be
harmless on all other devices.
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D56107
Reviewed by: imp
|
|
Each MDIO transfer takes 8ms, and all of that is spent in a set
of DELAY() calls, which is consuming a LOT of CPU.
* Change the timeout in ixgbe_hic_unlocked() - doing IPC to the
on-chip firmware - to a 1uS delay and bump timeout appropriately.
This seems to finish in a couple of microseconds on my local
test devices.
* Change the 2ms sleep in ixgbe_release_swfw_sync_X540() to 2ms
for EEPROM/flash, and 10uS otherwise. 10uS seems to work fine
on my local testing, but the config EEPROM doesn't read right
without this extra delay.
The first change shouldn't change the driver behaviour, but the
latter change is more intrusive and needs some wider testing.
(My guess here is that there SHOULD have been some completion
check somewhere in the EEPROM/flash IO path, and these sleeps
are masking them.)
Locally tested:
* C3558 (Denverton) w/ X553 backplane
Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D50295
|
|
This works enough to let me see the marvell switch on the MDIO bus.
It uses clause 22, which ixgbe's existing MDIO code doesn't currently
support, so it's implemented in a new source file.
Since mdio(4) is now required, add it where appropriate to GENERIC kernels.
Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D50128
|
|
Add a per-interface loader tunable dev.rge.%d.disable_aspm to
disable PCIe ASPM (L0s/L1) and ECPM on the RTL8125/8126/8127.
Disabling ASPM reduces latency at the cost of higher power
consumption. Default is off (ASPM left as configured by BIOS).
Signed-off-by: Christos Longros <chris.longros@gmail.com>
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D56103
|
|
Apple SMCs contain numerous undocumented voltage, current, power,
and ambient light sensors. This change adds automatic detection
and registration of these sensors as sysctls.
New sysctl trees:
dev.asmc.0.voltage.* - Voltage sensors (millivolts)
dev.asmc.0.current.* - Current sensors (milliamps)
dev.asmc.0.power.* - Power sensors (milliwatts)
dev.asmc.0.ambient.* - Ambient light sensors
Implementation:
- Scans all SMC keys at attach time via asmc_key_dump_by_index()
- Identifies sensors by key prefix patterns:
- Voltage: VC*, VD*, VG*, VP*, VI*
- Current: I{C,D,G,M,N,O,H,P,B,A,L}*
- Power: P{C,D,N,S,T,H,F,Z,z}*
- Light: ALV*, ALS*
- Dynamically creates sysctls for detected sensors
- Supports 8 fixed-point SMC data types:
- sp78, sp87, sp4b, sp5a, sp69, sp96, sp2d, ui16
- Auto-converts all values to milli-units (mV, mA, mW)
On Mac Mini 5,1, detects:
- 7 voltage sensors
- 18 current sensors
- 27 power sensors
- 2 ambient light sensors
Enables power consumption monitoring, voltage rail debugging,
and ambient light detection without hardcoding model-specific
sensor lists.
Tested on:
- Mac Mini 5,1 (2011) running FreeBSD 15.0-RELEASE
- 54 sensors auto-detected and exposed via sysctl
- All sensor types verified with multimeter readings
- Fixed-point conversions validated against known values
- Memory management tested (malloc/free on detach)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D55807
|
|
Instead of trying to parse a bogus node, just skip it if marked
disabled.
|
|
|
|
The clock calibration routine currently can result in rx timestamps
jumping backwards, which can confuse the TCP stack.
Ensure they are monotonically increasing by estimating what
we'd calculate as the next timestamp and clamp the calibration
so new timestamps are no earlier in time.
Reviewed by: kib, nickbanks_netflix.com
Tested by: nickbanks_netflix.com
Differential Revision: https://reviews.freebsd.org/D56427
Sponsored by: Netflix
|
|
Frequently there are some unused/unspecified fixed clocks present in a
device tree. Each one emits a warning before it fails to attach, which
results in (sometimes many) repeated messages which are not
user-actionable.
Put this warning behind the bootverbose flag.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56204
|
|
Adjust the function signature and the few callers that don't treat it
this way already.
This is style only; no functional change intended.
Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56203
|
|
Some ACPI debugging prints call acpi_d_state_to_str() on unset D-states
(i.e. ACPI_STATE_UNKNOWN), so return a string explicitly saying "unknown
D-state" instead of just panicking.
Fixes: 84bbfc32a3f4 ("acpi_powerres: D3cold support")
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
The switch fell through from the supported B150–B115200 cases into default
and returned EINVAL for every speed. Break out before default so valid
rates return success, matching uvscom_cfg_param().
Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
Reviewed by: imp,aokblast
Pull Request: https://github.com/freebsd/freebsd-src/pull/2110
|
|
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2137
|
|
This commit adds support for the MacBookPro13,1 (late 2016, 13-inch). The SMC
keys were collected from https://logi.wiki/index.php/SMC_Sensor_Codes. Two
temperature keys are omitted because they fail to be read: TI0P (IO Proximity)
and Ta0P (Ambient Air).
Note that the with this model the `dev.asmc.0.fan.0.minspeed` setting only
applies when the fans have been activated by the system. In my testing, the fans
did not spin up until CPU temperatures hit about 80C. At lower temperatures, the
fans will happily ignore the minimum speed and remain at 0 rpm.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2137
|
|
HID driver for Apple IR receivers (USB HID, vendor 0x05ac).
Supports Apple Remote and generic IR remotes using NEC protocol.
Supported hardware:
- Apple IR Receiver (0x8240, 0x8241, 0x8242, 0x8243, 0x1440)
Apple Remote protocol (proprietary 5-byte HID reports):
- Key down/repeat/battery-low detection
- 17-key mapping with two-packet command support
- Synthesized key-up via 125ms callout timer
Generic IR remotes (NEC protocol):
- Format: [0x26][0x7f][0x80][code][~code]
- Checksum: code + ~code = 0xFF
- Default keymap with 8 common codes
- See: https://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol
Output via evdev with standard KEY_* codes.
Raw HID access available at /dev/hidraw0 for custom remapping.
Based on protocol reverse-engineering by James McKenzie et al.
Reference: drivers/hid/hid-appleir.c (Linux)
Tested on Mac Mini 2011 (0x05ac:0x8242).
Differential Revision: https://reviews.freebsd.org/D55472
|
|
Check a PCI device's class, subclass, and progif to figure out if it is
a USB4 NHI. nhi_identifiers is completely removed as only these generic
USB4 NHIs are supported anyway, and all remnants of ICM-supporting code
are removed too. All devices now use the HCM.
PR: 290827
Reviewed by: jhb, ngie
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52861
|
|
This patch adds a debugging interface to read and write arbitrary
Apple SMC keys by name through sysctl, enabling hardware exploration
and control of undocumented features.
The interface provides four sysctls under dev.asmc.0.raw.*:
- key - Set the 4-character SMC key name (e.g., "AUPO")
- value - Read/write key value as a hex string
- len - Auto-detected key value length (can be overridden)
- type - Read-only 4-character type string (e.g., "ui8", "flt")
Implementation includes a new asmc_key_getinfo() function using SMC
command 0x13 to query key metadata. The interface automatically
detects key lengths and types, uses hex string encoding for
arbitrary binary values, and is safe for concurrent access via
CTLFLAG_NEEDGIANT.
This interface was essential for discovering that the AUPO key
enables Wake-on-LAN from S5 state, and for mapping all 297 SMC keys
on Mac Mini 5,1.
Reviewed by: ngie, adrian, markj
Differential Revision: https://reviews.freebsd.org/D54441
|
|
Noticed by: jhb
Sponsored by: Netflix
|
|
Implement Linux I2C ioctl translation in the Linux compatibility layer
and wire iicbus cdevs up for in-kernel rdwr handling.
Support common i2c-dev requests including SLAVE, FUNCS, and RDWR,
while rejecting unsupported 10-bit and SMBus operations.
Signed-off-by: YAO, Xin <mr.yaoxin@outlook.com>
Reviewed by: imp, adrian, pouria
Differential Revision: https://reviews.freebsd.org/D56251
|
|
The size broke when upages was converted from array to double pointer.
Reported by: gcc -Wsizeof-pointer-div
Reviewed by: imp
Fixes: 82ff1c334b97 ("nvme: Allow larger user request sizes")
Differential Revision: https://reviews.freebsd.org/D56368
|
|
The inpcb flag INP_DROPPED served two purposes.
It was used by TCP and subsystems running on top of TCP as a flag that
marks a connection that is now in TCPS_CLOSED, but was in some other state
before (not a new-born connection). Create a new TCP flag TF_DISCONNECTED
for this purpose.
The in_pcbdrop() was a TCP's version of in_pcbdisconnect() that also sets
INP_DROPPED. Use in_pcbdisconnect() instead.
Second purpose of INP_DROPPED was a negative lookup mask in
inp_smr_lock(), as SMR-protected lookup may see inpcbs that had been
removed from the hash. We already have had INP_INHASHLIST that marks
inpcb that is in hash. Convert it into INP_UNCONNECTED with the opposite
meaning. This allows to combine it with INP_FREED for the negative lookup
mask.
The Chelsio/ToE and kTLS changes are done with some style refactoring,
like moving inp/tp assignments up and using macros for that. However, no
deep thinking was taken to check if those checks are really needed, it
could be that some are not.
Reviewed by: rrs
Differential Revision: https://reviews.freebsd.org/D56186
|
|
Before this change evdev interface sent only copy of data sent through
the sysmouse interface. It worked as /dev/wsp0 device node was
automatcaly opened by devd(8) with starting of moused(8).
Starting with 15.0 moused(8) does not open sysmouse interface by default
thus making wsp(4) device dysfunctional.
Fix it with adding extra checks of interfaces state.
MFC after: 1 week
|
|
They always report it value as zero breaking pressure-driven drivers
like moused(8) and xf86-input-synaptics.
MFC after: 1 week
|
|
They always report it value as zero breaking pressure-driven drivers
like moused(8) and xf86-input-synaptics.
MFC after: 1 week
|
|
These devices appeared to stop sending reports via mouse USB interface
after switching to RAW mode. Fix it with changing Usage of Top Level
Collection to one found in HID report descriptor of proper interface.
MFC after: 1 week
|
|
According to "HID Usage Tables FOR Universal Serial Bus (USB)"
Usage Page ID range 0x93-0xF1CF is "Reserved" and Usage Page ID range
0xFF00-0xFFFF is "Vendor-defined".
MFC after: 1 week
|
|
Focus on the MRQE field of the MRQC register, which is 4 bits wide,
and we use these 3 types of values.
- IXGBE_MRQC_RSSEN 0x1 (non VF mode)
- IXGBE_MRQC_VMDQRSS32EN 0xA (less than 33 VFs)
- IXGBE_MRQC_VMDQRSS64EN 0xB (less than 65 VFs)
If we always take a bitwise OR with IXGBE_MRQC_RSSEN,
IXGBE_MRQC_VMDQRSS32EN will never be chosen.
Select these 3 types of values for the proper case.
Signed-off-by: Yuichiro NAITO <naito.yuichiro@gmail.com>
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/2132
|
|
* migrate the MSM8916 (snapdragon 410) support to qcom_gcc
* add the full qcom_gcc / qcom_clk list to files.arm64, replacing
the MSM8916 stub in sys/arm64/qualcomm .
Differential Revision: https://reviews.freebsd.org/D49706
|
|
Advertise IFCAP_WOL_MAGIC when PCI power management is available
and enable it by default. On suspend or shutdown, rge_setwol()
enables the WOL_MAGIC and WOL_LANWAKE bits in CFG3/CFG5, disables
the RXDV gate, and enables PM so the NIC stays powered to watch
for magic packets.
Move hardware-specific WOL register configuration into
rge_wol_config() in if_rge_hw.c to keep hardware-specific
functions in sync with OpenBSD.
Update rge.4 to document WoL support.
Tested on FreeBSD 16.0-CURRENT bare metal with Realtek RTL8125
on a Gigabyte B650 Gaming X AX motherboard.
Signed-off-by: Christos Longros <chris.longros@gmail.com>
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D56259
|
|
We have a small buffer for pages on the stack, but if the user wants to
do an I/O larger than this we currently fail w/o a way for the user to
know the max size. It's not hard to allocate an array for the uncommon
case of very large I/Os, and the performance advantage of the array is
small in that case anyway. In addition, this allows firmware upgrades
using the full transfer size of the device as a happy accident too.
Sponsored by: Netflix
Reviewed by: chs, chuck
Differential Revision: https://reviews.freebsd.org/D55638
|
|
This is part 3 of the support for the new Intel Ethernet E610
family of devices
The ix driver now enables firmware logging on Intel E610 devices
for debugging with Customer Support. Logs are enabled by default
and generated in binary format that requires decoding by support
teams. The collected data is firmware and hardware related for
debugging purposes only.
When the driver loads, it creates a fw_log sysctl node under the
debug section. Events are organized into categories (modules) for
targeted logging, and users can adjust verbosity levels as needed.
This adds sysctl support for the firmware logging feature and
updates the ix(4) manual page with documentation.
Signed-off-by: Yogesh Bhosale <yogesh.bhosale@intel.com>
Co-developed-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed by: ziaee, kbowling
Tested by: Mateusz Moga <mateusz.moga@intel.com>
MFC after: 1 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D53973
|
|
Both fetch and op IBS sampling have the same problem where we need to
rewrite the control MSR to ensure sampling continues at the correct
rate. I also like this because it resets the counter reducing the
chances that we collect a sample inside the NMI handler.
Reported by: Aalok Agarwal
Reviewed by: mhorne
Sponsored by: Netflix
Fixes: e51ef8ae490f ("hwpmc: Initial support for AMD IBS")
Pull Request: https://github.com/freebsd/freebsd-src/pull/2130
|
|
In ibs_stop_pmc I accidently cleared the fetch max count value rather
than the op max count value, when stopping the op counter. This
mitigates a bug in early pre-zen processors, but breaks using both
counters simultaneously. I also found that the max op count mask needs
to be extended for recent zen processors.
Reported by: Andre Fernando da Silva
Reviewed by: mhorne
Sponsored by: Netflix
Fixes: e51ef8ae490f ("hwpmc: Initial support for AMD IBS")
Pull Request: https://github.com/freebsd/freebsd-src/pull/2120
|
|
.../sys/dev/hwpmc/hwpmc_mod.c:4640:1: warning: unused function 'pmc_is_multipart' [-Wunused-function]
4640 | pmc_is_multipart(struct pmc_sample *ps)
| ^~~~~~~~~~~~~~~~
1 warning generated.
Reviewed by: mhorne
Fixes: e51ef8ae490f - main - hwpmc: Initial support for AMD IBS
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D56296
|
|
Commit c8c37141 ("virtio_blk: Use bus_dma for command/ack buffer
allocations") failed to update initialisation of the dedicated dump
request structure. This caused a panic on attempting to dump core to a
virtio_blk device.
Reviewed by: asomers
Sponsored by: Arm Ltd
Pull Request: https://reviews.freebsd.org/D56156
|
|
As soon as we need information from the hardware frame annotation to
make sure that checksums of the ingress frames were verified by the
DPAA2 HW, I've decided to make a preparation and extracted all of the
frame related routines into the separate dpaa2_frame.[h,c] along with
some clean up and improvements, e.g. no more dpaa2_fa, but dpaa2_swa
and dpaa2_hwa structures to describe software and hardware frame
annotations respectively, dpaa2_fa_get_swa/dpaa2_fa_get_hwa to obtain
those annotations from the frame descriptor. The next step is to
implement dpaa2_fa_get_hwa.
PR: 292006
Approved by: tuexen
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56315
|
|
Previously, when entering s2idle, we were parsing the _S255D object to
get the shallowest D-state supported by device, as
acpi_stype_to_sstate() returns -1 for s2idle.
Instead, we should read _S3D.
Relevant document:
https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/07_Power_and_Performance_Mgmt/device-power-management-objects.html#s3d-s3-device-state
Reviewed by: olce
Tested by: emaste, olce
Approved by: olce
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55118
|
|
I think this is cleaner than playing around with return values.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56264
|
|
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56263
|
|
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56240
|
|
These still haven't been implemented by the original author, and there
doesn't seem to be much use for them anyway.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56239
|
|
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56238
|
|
This commit adds page & bank fields to ifi2creq in preparation
for adding CMIS support for 400g optics to ifconfig.
The new ioctl SIOCGI2CPB is added, so that drivers can distinguish
between callers asking for page/bank selection and legacy callers
that simply failed to zero out all ifi2creq fields.
The mlx5en(4) driver and iflib(4) driver frameork have been updated
to use this new SIOCGI2CPB ioctl and support page/bank operations.
A follow-on patchset will add support to ifconfig for reporting
data from CMIS optics.
This has been tested on Nvidia ConnectX-7 and Broadcom Thor2 (using
out of tree driver) based NICs.
Differential Revision: https://reviews.freebsd.org/D55912
Sponsored by: Netflix Inc.
Reviewed by: kib
|