| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
The driver now retrieves the Time Stamp value from Driver Page 1
during load and after controller reset. If the value is valid, it
is used to enable periodic host timestamp synchronization.
This adds a tunable NVData parameter to control the behavior of
host time sync, enhancing flexibility and platform-specific control.
Reviewed by: ssaxena, imp
Differential Revision: https://reviews.freebsd.org/D49748
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The driver now checks for insufficient power faults during the load
phase and immediately fails initialization instead of retrying.
Additionally, if an insufficient power fault is detected by the watchdog
after the controller is up, the controller is marked as unrecoverable
instead of triggering a reset.
This improves fault handling and avoids unnecessary recovery attempts
in low-power conditions.
Reviewed by: ssaxena, imp
Differential Revision: https://reviews.freebsd.org/D49747
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch improves the retry logic during the IOC enable process.
If a controller faults or if the reset history bit is detected during
the ready status check, the driver will retry initialization up to three
times or until 510 seconds have passed.
A soft reset will also be issued if the controller is detected while
waiting for the ready status.
This enhances reliability during controller initialization.
Reviewed by: ssaxena, imp
Differential Revision: https://reviews.freebsd.org/D49746
|
| |
|
|
|
|
|
|
|
| |
This patch updates the driver to set the OSExposure field in DriverCapability
during IOCInit to MPI3_IOCINIT_DRIVERCAP_OSEXPOSURE_NO_SPECIAL(0x1), aligning
with the latest MPI specification version 36.
Reviewed by: ssaxena, imp
Differential Revision: https://reviews.freebsd.org/D49745
|
| |
|
|
|
|
|
|
|
| |
Updated the MPI header files to version 36 to align with the latest
MPI specification. This includes updated structures, field definitions,
and constants required for compatibility with updated firmware.
Reviewed by: ssaxena, imp
Differential Revision: https://reviews.freebsd.org/D49743
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the minimum support required to probe/attach the 88E6190X.
I've tested this against an AT&T ATT-150 OCP device (Silicom i3000)
with local changes to export MDIO via ixge(4).
Hints are required to probe/attach/configure the switch on amd64,
but with the mentioned diffs, it does work.
Thanks to Stas Alekseev <stas@alekseev.us> for the pull request
and Stas / Jason Hensler <omegadraconis@gmail.com> for chasing
down information about the chipset, linux stuff and AT&T OCP
hardware information.
PR: kern/281211
Pull Request: https://github.com/freebsd/freebsd-src/pull/1408
Differential Revision: https://reviews.freebsd.org/D50044
Reviewed by: imp
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although all the machinery is present, the tick routine only ran once.
It was never rescheduled. So, reschedule it.
However in practice I've discovered that the tick routine is running
whilst a bunch of phys are actually being probe/attached on each per-port
MII bus being created and probed off of the switch itself.
Until that's debugged (and likely the whole PHY management stuff is
cleaned up here), just add a NULL check and thus don't panic.
Differential Revision: https://reviews.freebsd.org/D50031
Reviewed by: imp
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Although the tick isn't running every hz right now, when it /is/
running at hz, the shutdown path will race with an existing running
tick routine, causing unpredictable panics.
* Introduce a shutdown flag which will abort doing the tick work if set
* set the shutdown flag and start cancel/draining the taskqueue during
detach.
Differential Revision: https://reviews.freebsd.org/D50030
|
| |
|
|
|
|
|
|
| |
The driver sleep lock was being held during most of the error paths,
and not unlocking it will panic the kernel during detach. So, fix it.
Differential Revision: https://reviews.freebsd.org/D50029
Reviewed by: imp
|
| |
|
|
|
|
|
|
| |
This fixes the driver to load correctly as a module when etherswitch
is also a module.
Differential Revision: https://reviews.freebsd.org/D50027
Reviewed by: imp
|
| |
|
|
|
|
|
| |
This is required for it to be a module
Differential Revision: https://reviews.freebsd.org/D50024
Reviewed by: imp
|
| |
|
|
|
|
|
|
| |
To match documentation.
Reported by: Ihor Dutchak <ihor.youw@gmail.com>
PR: 286155
MFC after: 3 days
|
| |
|
|
|
|
| |
To match Linux.
MFC after: 3 days
|
| |
|
|
|
|
| |
To match Linux.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to Linux hidraw compatibility API.
Respective Linux commit f43d3870cafa made by Dean Camera message is:
Currently the hidraw module can only read and write feature HID reports on
demand, via dedicated ioctls. Input reports are read from the device through
the read() interface, while output reports are written through the write
interface().
This is insufficient; it is desirable in many situations to be able to read and
write input and output reports through the control interface to cover
additional scenarios:
- Reading an input report by its report ID, to get initial state
- Writing an input report, to set initial input state in the device
- Reading an output report by its report ID, to obtain current state
- Writing an output report by its report ID, out of band
This patch adds these missing ioctl requests to read and write the remaining
HID report types. Note that not all HID backends will neccesarily support this
(e.g. while the USB link layer supports setting Input reports, others may not).
FreeBSD native uhid(4) compatible API already has similar ioctls.
MFC after: 3 days
|
| |
|
|
|
| |
Reported by: alc
Fixes: e1f3f15192c1 ("agp: use iterators to speed up lookups")
|
| |
|
|
|
|
| |
Committed by accident.
This reverts commit facccfc8c7e1463c3139a74d746b715c4f3a02a0.
|
| |
|
|
|
|
| |
Committed by accident.
This reverts commit 532b45fe103c623855bf1004d5de2fd41e2885e4.
|
| |
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D49805
|
| |
|
|
|
|
|
|
|
| |
No functional change.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D49804
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SD_F_* flags are supposed to be softc flags, but SD_F_PRIO_RD and
SD_F_PRIO_WR are just generic flags and are only used with
dsp_lock_chans() and dsp_unlock_chans(). Since we already have the
DSP_F_READ() and DSP_F_WRITE() macros, we can re-use them instead.
I am aware the FREAD and FWRITE flags are meant to be used with open(),
but I think their use here is clear enough to not cause confusion.
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D49978
|
| |
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D49983
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to 02d4eeabfd73 ("sound: Allocate vchans on-demand"), the
play.vchans and rec.vchans sysctls corresponded to the value of
d->pvchancount and d->rvchancount respectively, which is also what we
are exporting through SNDST_DSPS_SOUND4_PVCHAN and
SNDST_DSPS_SOUND4_RVCHAN respectively. Since that commit, the sysctls
mentioned have been modified to show whether play/rec vchans are enabled
or not. Modify the sndstat nvlist parameters accordingly.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D49980
|
| |
|
|
|
|
|
| |
This adds the ASMC support for the macmini 6,1 and 6,2.
PR: kern/268141
Differential Revision: https://reviews.freebsd.org/D49929
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The max I/O size that an mpi3mr HBA supports is reported in the IOCFacts
structure (with 0 representing the legacy max I/O size of 1 MB).
By default, set the max I/O size of devices attached to mpi3mr controllers
to the smaller of the HBA's max I/O size and the kernel's maxphys.
Allow this default to be overriden by a global tunable
"hw.mpi3mr.max_sgl_entries" or by a per-controller tunable
"dev.mpi3mr.N.max_sgl_entries".
Sponsored by: Netflix
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D49090
|
| |
|
|
|
|
|
|
|
| |
The ctx_hw_stats_ext DMA address was not correctly passed to the
firmware during the HWRM_STAT_CTX_ALLOC allocation, causing stats to not
populate for Thor2. Passing the correct DMA length resolved the issue
MFC-After: 3 days
Differential-Revision: https://reviews.freebsd.org/D49732
|
| |
|
|
|
|
|
|
|
| |
The completion event type 76 is not supported by the driver. Instead of
flooding the dmesg with "Unknown event type" messages when this event
occurs, move the print under debug level.
MFC-After: 3 days
Differential-Revision: https://reviews.freebsd.org/D49731
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doorbell offset :
For Thor controllers doorbell offset was always hardcoded to 0x10000 for
PF devices where as for Thor2 controllers doorbell offset will be
legacy_l2_db_size_kb value provided by firmware through hwrm_func_qcfg
command.
CQ Toggle & Epoch bits support :
In order to handle out of order doorbell handling as part of Dropped
Doorbell Recovery, HW expects two changes in the driver in data path.
- First change is the epoch bit changes while updating the producer
indexes of Tx. This epoch bit is toggled by the driver, each time the
queue is wrapped for that specific doorbell.
- The second change is to add a toggle bit pair to each ARM type
doorbell. This includes the CQ_ARMALL, CQ_ARMSE, CQ_ARMENA
doorbells. The toggle bit pair in context is incremented by the chip
each time a new NQE completion is generated by the chip. To keep the
driver in-sync, the toggle bit pair will be passed in the NQE to the
host completion. This will be the toggle bit pair value that the host
must use to setup the next NQE operation. The driver will pass that
latest toggle bit pair value into the ARM type doorbells it generates to
the chip. The doorbell clients will compare the toggle bit pair in each
doorbell with the value in context. If the values match, the doorbell
will be honored. If the values do not match, the doorbell will be
discarded.
MFC-After: 3 days
Differential-Revision: https://reviews.freebsd.org/D49730
|
| |
|
|
|
|
|
| |
Added 400G speed module support.
MFC-After: 3 days
Differential-Revision: https://reviews.freebsd.org/D49729
|
| |
|
|
|
|
|
|
| |
Added support for RX V3 completion record types-
CMPL_BASE_TYPE_RX_TPA_START_V3 and CMPL_BASE_TYPE_RX_L2_V3.
MFC-After: 3 days
Differential-Revision: https://reviews.freebsd.org/D49728
|
| |
|
|
|
|
|
|
|
| |
Add backing store V2 support.
Thor2 controllers supports only the V2 support.
MFC-After: 3 days
Reviewed-by: Warner Losh <imp@FreeBSD.org>
Differential-Revision: https://reviews.freebsd.org/D49727
|
| |
|
|
|
|
|
| |
Update HSI header to support Thor2 controllers.
MFC-After: 3 days
Differential-Revision: https://reviews.freebsd.org/D49726
|
| |
|
|
|
|
|
|
|
| |
Add Thor2 PCI IDs.
Reviewed-by: Warner Losh <imp@FreeBSD.org>
Reviewed-by: Sumit Saxena <sumit.saxena@broadcom.com>
MFC-After: 3 days
Differential-Revision: https://reviews.freebsd.org/D49725
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
INTRng can leak resources when INTx interrupts are re-routed, which is
typically harmless but can be fatal when devices are (repeatedly) hot
plugged into PCI buses on INTRng systems. Re-routing INTx interrupts
is nonetheless still necessary on some systems, and identifying whether
the re-routing should be enabled or disabled seems to be nontrivial.
Add a hw.pci.intx_reroute sysctl/tunable so systems which don't want
legacy PCI interrupt re-routing can turn it off. This is probably not
the best fix but it's something which can be safely included in FreeBSD
14.3.
Co-Authored-by: jhb
Reviewed by: bz, jhb
MFC after: 3 days
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D49849
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jrtc27@freebsd.org reported that DHCP wasn't working on some
networks. She dug into it and found that the RTL8812AU/RTL8812AU
NICs seem to be failing UDP frames w/ a zero checksum, which is
a valid "there's no checksum" checksum.
So, just pass those frames up the stack and let the IP stack
deal with it. If the hardware claims the frames did pass TCP/UDP
checksum then still mark those frames with the checksum offload
bits.
PR: kern/285387
Differential Revision: https://reviews.freebsd.org/D49628
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The RX filter wasn't enabling BAR frames, so we weren't receiving them
during normal operation.
Jessica noticed we WERE getting BAR frames, but only when promisc mode
is active. Which is a different set of bugs, but it did highlight
the differences here.
Differential Revision: https://reviews.freebsd.org/D49596
PR: kern/285822
|
| |
|
|
|
|
|
|
|
| |
As axidma(4) does not support busdma(9) then add local cache flushes,
and map descriptors using default memory attribute (cacheable type).
This fixes operation on Codasip X730.
Sponsored by: UKRI
|
| |
|
|
|
|
|
|
|
| |
Any events left over from boot firmware, etc. are not meaningful so
clear pending events during attach. If they are still pending they
should remain asserted when the slot status register is re-read.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D49950
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At least some PCI-express bridges exposed by Intel Volume Management
Devices report bogus power faults in their slot status register. As a
workaround, ignore the power fault detected flag if the slot
capability register does not indicate support for a power controller.
While the PCI-e spec does not explicitly state that the PFD flag
should always be zero if a power controller is not present, parts of
the spec do seem to assume this. For example, the flag is included in
the "Power Controller Registers" register group in 6.7.2.4, and the
definition of the value for this flag seems to presume the presence of
a power controller:
If a Power Controller that supports power fault detection is
implemented, this bit is Set when the Power Controller detects a
power fault at this slot. Note that, depending on hardware
capability, it is possible that a power fault can be detected at
any time, independent of the Power Controller Control setting or
the occupancy of the slot. If power fault detection is not
supported, this bit must not be Set.
PR: 285993
Reported by: Jim Long <freebsd-bugzilla@umpquanet.com>
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D49949
|
| |
|
|
|
|
|
|
|
|
|
| |
We call an ACPICA function in the interrupt handler which may attempt to
lock a mutex. If this is done while another instance of the handler
already holds the lock, it would cause a kernel panic since sleeping
isn't allowed.
Reviewed-by: Warner Losh <imp@FreeBSD.org>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1667
Signed-off-by: Ahmad Khalifa <ahmadkhalifa570@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
GPIOBUS_PIN_SETFLAGS calls GPIO_PIN_SETFLAGS, which doesn't accept
interrupt flags.
Reviewed-by: Warner Losh <imp@FreeBSD.org>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1667
Signed-off-by: Ahmad Khalifa <ahmadkhalifa570@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The flags member of gpio_pin_t was only meant for pin flags acquired via
the FDT.
Instead, make an accessor so gpioaei can still access the flags and
remove the now unused gpio_pin_get_by_acpi_index.
Reviewed-by: Warner Losh <imp@FreeBSD.org>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1667
Signed-off-by: Ahmad Khalifa <ahmadkhalifa570@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
This message was identical to another a few lines up, making it hard to
tell where the error occurred.
Reviewed-by: Ed Maste <emaste@FreeBSD.org>
Reviewed-by: Warner Losh <imp@FreeBSD.org>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1667
Signed-off-by: Ahmad Khalifa <ahmadkhalifa570@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uether_rxmbuf() assumes the uether_newbuf() model where the caller has
just set m_len to the entire size of the mbuf, and passed the final
size into uether_rxmbuf() for finalization.
In if_ure we're creating our own mbuf chains, and the accounting is all
already accurate. uether_rxmbuf's logic won't work at all for a chain,
so let's add an assertion to that effect (but I think the other callers
were all OK).
This fixes a panic on my Windows DevKit when undergoing any kind of
network stress that surfaces after the bogus mbuf is injected into the
network stack (usually observed in `m_dup`).
markj and I had spent some time investigating it and decided there's
some kind of buffer underrun happening; the rx packet descriptor reports
a length longer than what's actually available. We discard the rest of
the transfer, but then we end up fetching it in a subsequent transfer
and end up casting packet data to a `struct ure_rxpkt` incorrectly. It
would be better to fix the underlying root cause, but this is a
reasonable mitigation in the interim.
Reviewed by: markj
Fixes: 7d5522e16a ("A major update to the ure driver.")
Differential Revision: https://reviews.freebsd.org/D43465
|
| |
|
|
|
|
|
|
|
| |
agp_generic_bind_memory and agp_generic_unbind_memory do pctrie
lookups for ranges of consecutive pages. Use iterators to improved the
expected performance of those searches.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49917
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Move the necessary extra logics (i.e., noise_remote_enable() and
TAILQ_INSERT_TAIL()) from wg_ioctl_set() to wg_peer_alloc(), and thus
make it easier to be called. Actually, the updated version is more
asymmetric to wg_peer_destroy() and thus less likely to be misused.
Meanwhile, rename it to wg_peer_create() to look more consistent with
wg_peer_destroy().
Reviewed by: aly_aaronly.me (diff), markj
Obtained from: DragonflyBSD 902964ab24ba (with some changes)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This debugging code was added this log as part of an effort to diagnose
firmware crashes in an earlier version of the driver.
It hasn't been used for a while and I'm not sure how useful it is for
this compared to other methods.
While reorganisation move strings for print mappings into if_iwx_debug.c
to reduce their scope.
Suggested by: bz
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49783
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iwx goes through a couple of steps to match devices to firmware. There
is a default match of pcie device and subdevices and then a secondary
pass to find a template configuration struct.
Previously we were looking up the device not the subdevice and that
led to ax210 cards in some devices (Framework 13) from being matched to
the correct firmware.
PR: 285905
Reviewed by: bz, adrian
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49759
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce SPI-mode support which allows an SD card to communicate with a
host system using SPI protocol, as described in the SD Card Specification.
This feature is useful for low-end, FPGA or RISC-V research systems when a
SoC is limited in terms of peripherals available (e.g. lack of a dedicated
MMC controller in hardware). Examples of such systems include Codasip,
lowRISC and CVA6.
Project timeline:
2007: Warner first discussed SPI operational mode in his MMC presentation:
https://people.freebsd.org/~imp/bsdcan2007.pdf
2012: Patrick Kelsey engineered the support.
2025: Ruslan cleaned up, tested on Codasip X730 platform (RISC-V FPGA)
and put the patch to review.
2025: Patrick Kelsey reviewed the patch and aligned with the current MMC
code.
Reviewed by: pkelsey
Sponsored by: UKRI
Differential Revision: https://reviews.freebsd.org/D49248
|
| |
|
|
|
|
|
|
|
|
|
| |
- Introduce the bus_type accessor, which allows to skip card selection
and timing settings in SPI mode;
- Add MMC_CMD_IS_APP flag for commands followed by the APP command,
which is required by the upcoming MMCSPI driver.
Reviewed by: pkelsey
Sponsored by: UKRI
Differential Revision: https://reviews.freebsd.org/D49249
|