There is a (very historical) call to pci_assign_interrupt for the
purpose of routing IRQs which may have been set up wrong by x86 BIOS
or firmware. On non-x86 systems, this is unnecessary; and on INTRNG
systems it results in a (synthetic) IRQ leak and ultimately a kernel
panic after many hotplug/unplug cycles.
Suggested by: jhb
Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D49560
Check if CTS bit is set in the mailbox message before waiting for ACK.
Otherwise ACK will never be received causing the function to timeout. Add
a note for ixgbe_write_mbx that it should be called while holding a lock.
Fixes: 6d243d2 ("net/ixgbe/base: introduce new mailbox API")
Cc: stable@dpdk.org
Signed-off-by: Norbert Ciosek <norbertx.ciosek@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Obtained from: DPDK (1f119e4)
MFC after: 1 week
This is the more typical pattern for other capability register sets,
and two of these variables weren't used.
Differential Revision: https://reviews.freebsd.org/D49267
Depend on the PCI bus driver clearing PME# after resume to remove the
need for clearing PME# from DEVICE_RESUME methods.
Use pci_has_pm and pci_enable_pme.
Reviewed by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Differential Revision: https://reviews.freebsd.org/D49251
pci_has_pm is a quick check that returns true if a PCI device supports
the power management capability.
pci_enable_pme can be used in DEVICE_SUSPEND driver methods to enable
PME# during suspend.
Reviewed by: Krzysztof Galazka <krzysztof.galazka@intel.com>x
Differential Revision: https://reviews.freebsd.org/D49250
The PCI power management specification requires that the OS clear any
pending PME# interrupt and generation of PME# interrupts during
"initial operating system load". Note that clearing a pending PME#
interrupt requires writing a 1 to the Read/Write-Clear PME bit in the
power management status register. To handle the boot time case, clear
PME# state in pci_read_cap() when scanning new PCI devices. This
should also cover hotplug devices.
In addition, clear this state on every PCI device after resume from
sleep in pci_resume_child before invoking the driver's DEVICE_RESUME
method.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D49222
Armv4, Armv5, and Armv6 support has been removed. Remove the Marvell
SoCs that used these cores.
Reviewed by: cognet, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D49497
Summary:
OPAL runs in big-endian mode, so we need to byteswap msg_len on little-endian.
MFC after: 1 week
Test Plan: ipmitool lan print
Reviewers: #powerpc
Subscribers: imp
Differential Revision: https://reviews.freebsd.org/D49530
Explicitly set the software ciphers; add support for GCMP-128.
Locally tested:
* AR5523 11abg NIC, 2/5GHz STA operation, GCMP forced
in wpa_supplicant.conf
Differential Revision: https://reviews.freebsd.org/D49370
Reviewed by: bz
I'm testing this with rtwn(4) NICs right now, so enable it here.
Locally tested:
* RTL8812AU / RTL8821AU, STA mode (with some wpa_supplicant.conf
shenanigans to force GCMP as the pairwise key to an OpenWRT AP
configured to use GCMP but without requiring MFP.)
Differential Revision: https://reviews.freebsd.org/D49190
Reviewed by: bz
The xae(9) driver expects that the "memory-region" property is always
provided in its DTS node, but this is not a case for every platform.
If the property is not provided, then no restriction on buffer location
is in place and busdma backend could be used.
Since the Xilinx AXI DMA engine driver does not support busdma(9), then
allocate some memory for buffers manually, so we don't panic.
This fixes operation on Codasip A730.
- add compat table and a string for an older IP
- name driver properly
- depend on ofw_spibus
- add missing ofw_bus_get_node() method
- connect to GENERIC (similar to other Xilinx IP)
Tested on Codasip A730.
GPIO0 needs to be flipped on to enable the amplifier.
The CS4208 looks /sort/ of like previous cirrus logic codecs,
enough for audio to work. This actually provides working audio
on my mbair 6,2 but it doesn't yet detect the jack.
That requires patches to the pin configs, which is going to
need some further work.
Differential Revision: https://reviews.freebsd.org/D49350
Reviewed by: christos
Future firmwares will report these types to the driver. These
transceivers work already but are misidentified as a different type.
MFC after: 1 month
Sponsored by: Chelsio Communications
HS200 mode requires tuning, and there is no code to perform this
tuning at present. Until there is, leave HS200 mode disabled.
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D49400
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
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
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
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
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 is needed to accomodate more data segments in wqes for 64K receive
mbuf chains.
Reviewed by: Ariel Ehrenberg <aehrenberg@nvidia.com>, Slava Shwartsman <slavash@nvidia.com>
Sponsored by: NVidia networking
MFC after: 1 week
Define it as the size of the single data segment in wqe.
Reviewed by: Ariel Ehrenberg <aehrenberg@nvidia.com>, Slava Shwartsman <slavash@nvidia.com>
Sponsored by: NVidia networking
MFC after: 1 week
The belief is that the 7*MCLBYTES limit was set to not hit the segment
limit for wqe busdma tag. But with the current mbuf allocator it is not
possible, and even if it was, the corresponding wqe fill would simply
fail.
Reviewed by: Ariel Ehrenberg <aehrenberg@nvidia.com>, Slava Shwartsman <slavash@nvidia.com>
Sponsored by: NVidia networking
MFC after: 1 week
Since the times the driver accepts s/g receive buffers, there is no
sense in trying to use pre-existing mbuf clusters sizes. The only
possible optimization is to use full page size if wqe size is greater
than MCLBYTES.
Reviewed by: Ariel Ehrenberg <aehrenberg@nvidia.com>, Slava Shwartsman <slavash@nvidia.com>
Sponsored by: NVidia networking
MFC after: 1 week
If the NIC is capable, just pass the full packet size, including L2/L3
headers, as the segment size. Otherwise, decrement the number of
strides by 1 to left the space for L2/IP headers, as it was done before.
But do the arithmetic on the segment number instead of the full packet
size.
Reviewed by: Ariel Ehrenberg <aehrenberg@nvidia.com>, Slava Shwartsman <slavash@nvidia.com>
Sponsored by: NVidia networking
MFC after: 1 week
This alone does not make hw lro configurable by sysctl, it only removes
unneeded complications for users to access it.
Reviewed by: Ariel Ehrenberg <aehrenberg@nvidia.com>, Slava Shwartsman <slavash@nvidia.com>
Sponsored by: NVidia networking
MFC after: 1 week
The USB bus performs additional teardown steps in between detaching
child devices and deleting child devices.
Reported by: phk, thj
Tested by: phk
Fixes: e9d3857040 ("Use bus_detach_children instead of bus_generic_detach")