Commit graph

39152 commits

Author SHA1 Message Date
Andrzej Ostruszka
b9fadaa375 e1000: clean LTO warnings
During LTO build compiler reports some 'false positive' warnings about
variables being possibly used uninitialized.  This patch silences these
warnings.

Exemplary compiler warning to suppress (with LTO enabled):
error: 'link' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
  if (link) {

Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>

Approved by:	imp
Obtained from:	DPDK (46136031f19107f4e9b6b3a952cb7f57877a7f0f)
MFC after:	1 week

(cherry picked from commit 089cdb3990)
2021-09-23 18:32:52 -07:00
Yong Wang
713e66e37d e1000: fix multicast setting in VF
In function e1000_update_mc_addr_list_vf(), "msgbuf[0]" is used prior
to initialization at "msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW".
And "msgbuf[0]" is overwritten at "msgbuf[0] = E1000_VF_SET_MULTICAST".

Fix it by moving the second line prior to the first one that mentioned
above.

Fixes: dffbaf7880a8 ("e1000: revert fix for multicast in VF")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Approved by:	imp
Obtained from:	DPDK (f58ca2f9ef6)
MFC after:	1 week

(cherry picked from commit ecf2a89a99)
2021-09-23 18:32:35 -07:00
Chengwen Feng
a026f32940 e1000: fix timeout for shadow RAM write
This fixes the timed out for shadow RAM write EEWR can't be detected.

Fixes: 5a32a257f957 ("e1000: more NICs in base driver")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>

Approved by:	imp
Obtained from:	DPDK (4a8ab48ec47b3616272e50620b8e1a9599358ea6)
MFC after:	1 week

(cherry picked from commit f6517a7e69)
2021-09-23 18:31:53 -07:00
Guinan Sun
f2f50e5e27 e1000: cleanup pre-processor tags
The codes has been exposed correctly, so remove pre-processor tags.

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (a50e998a0fd94e5db508710868a3417b1846425c)
MFC after:	1 week

(cherry picked from commit 9c4a0fabc8)
2021-09-23 18:31:34 -07:00
Guinan Sun
86b4f2f60e e1000: introduce DPGFR register
Defined DPGFR, Dynamic Power Gate Force Control Register.

Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (1469e5aceffbdcebe834292aadb40b1bd1602867)
MFC after:	1 week

(cherry picked from commit 7fb2111413)
2021-09-23 18:31:07 -07:00
Guinan Sun
270d34d745 e1000: expose FEXTNVM registers and masks
Adding defines for FEXTNVM8 and FEXTNVM12 registers with new masks for
future use.

Signed-off-by: Nir Efrati <nir.efrati@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (6d208ec099cd870a73c6b444b350a82c7a26c5e4)
MFC after:	1 week

(cherry picked from commit de965d042f)
2021-09-23 18:30:29 -07:00
Guinan Sun
b81b96fee2 e1000: add missed define for VFTA
VLAN filtering using the VFTA (VLAN Filter Table Array) and
should be initialized prior to setting rx mode.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (fc9933953c90e99970aa867c38f9c6e6c5d0488d)
MFC after:	1 week

(cherry picked from commit a8bb4ab7cf)
2021-09-23 18:30:12 -07:00
Guinan Sun
5bff1c8058 e1000: increase timeout for ME ULP exit
Due timing issues in WHL and since recovery by host is
not always supported, increased timeout for Manageability Engine(ME)
to finish Ultra Low Power(ULP) exit flow for Nahum before timer expiration.

Signed-off-by: Nir Efrati <nir.efrati@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (cf1f3ca45d33e793ca581200b4000c39a798113e)
MFC after:	1 week

(cherry picked from commit e8e3171d99)
2021-09-23 18:29:39 -07:00
Guinan Sun
41ff2b03ae e1000: add missing register defines
Added defines for the EEC, SHADOWINF and FLFWUPDATE registers needed for
the nvmupd_validate_offset function to correctly validate the NVM update
offset.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (2c7fe65ab9a31e6ebf438dad7ccc59bcde83a89f)
MFC after:	1 week

(cherry picked from commit 09888d4bc1)
2021-09-23 18:29:25 -07:00
Guinan Sun
7a3d9ce718 e1000: add PCIm function state
Added define to pcim function state.

Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (7ee1a3b273c7f321b50e6ba17c3d9537b1b08347)
MFC after:	1 week

(cherry picked from commit a6f0cc373f)
2021-09-23 18:26:35 -07:00
Guinan Sun
3e14760241 e1000: expose MAC functions
Now the functions are being accessed outside of the file, we need
to properly expose them for silicon families to use.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (df01c0ee277d51f81d7d72501dba97550d3b6c4a)
MFC after:	1 week

(cherry picked from commit d1c37752e2)
2021-09-23 18:26:21 -07:00
Guinan Sun
b06245701c e1000: update for i210 slow system clock
This code is required for the update for system clock.

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (3f0188c8f29847038bc9f306b2570ace57e3811c)
MFC after:	1 week

(cherry picked from commit 1883a6ff3b)
2021-09-23 18:23:06 -07:00
Guinan Sun
e4a16771e8 e1000: remove duplicated phy codes
Add two files base.c and base.h to reduce the redundancy
in the silicon family code.
Remove the code duplication from e1000_82575 files.
Clean family specific functions from base.
Fix up a stray and duplicate function declaration.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (44dddd14059f151f39f7e075b887decfc9a10f11)
MFC after:	1 week

(cherry picked from commit 6b9d35fac1)
2021-09-23 18:21:34 -07:00
Guinan Sun
412d4675bb e1000: modify HW level time sync mechanisms
Add additional configuration space access to allow HW
level time sync mechanism.

Signed-off-by: Evgeny Efimov <evgeny.efimov@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (d53391f1fe2e0eba8818517fdf285f893d95dcc8)
MFC after:	1 week

(cherry picked from commit d50f362b50)
2021-09-23 18:21:03 -07:00
Guinan Sun
1704007555 e1000: fix minor issues and improve code style
Fix typo in piece of code of NVM access for SPT.
And cleans up the remaining instances in the shared code
where it was not adhering to the Linux code standard.
Wrong description was found in the mentioned file, so fix them.
Remove shadowing variable declarations.

Relating to operands in bitwise operations having different sizes.
Unreachable code since *clock_in_i2c_* always return success.
Don't return unused s32 and don't check for constants.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Signed-off-by: Robert Konklewski <robertx.konklewski@intel.com>
Signed-off-by: Doug Dziggel <douglas.a.dziggel@intel.com>
Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (b8592c89c8fbc871d22313dcac0b86c89a7d5a62)
MFC after:	1 week

(cherry picked from commit 6c59e1866c)
2021-09-23 18:20:43 -07:00
Guinan Sun
b67aeb0b07 e1000: add function parameter descriptions
Add function parameter descriptions to address gcc 7 warnings.

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (1bf35d435c9764e83be76042fa6489dd127b6c40)
MFC after:	1 week

(cherry picked from commit 5b426b3e8c)
2021-09-23 18:20:16 -07:00
Guinan Sun
f72caa3ea9 e1000: expose xMDIO methods
Move read and write xmdio methods to e1000_phy.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (b14d20f1b2bb0e6d95f19963c5d7f55374e0ead9)
MFC after:	1 week

(cherry picked from commit da24467c7a)
2021-09-23 18:19:54 -07:00
Guinan Sun
3d3c15f6b9 e1000: add missing device ID
Adding Intel(R) I210 Gigabit Network Connection 15F6 device ID for SGMII
flashless automotive device.

Signed-off-by: Kamil Bednarczyk <kamil.bednarczyk@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (586d770bfefc01d4af97c0ddf17c960c3e49ec22)
MFC after:	1 week

(cherry picked from commit 82a9d0c2c1)
2021-09-23 18:19:38 -07:00
Guinan Sun
8788094ab1 e1000: support flashless i211 PBA
Add support to print PBA when using flashless.

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (d3c41d90dfd5b39dec14c74cf53086f4e6634aed)
MFC after:	1 week

(cherry picked from commit de0ae5d1cb)
2021-09-23 18:19:25 -07:00
Kevin Bowling
fd225bef9f e1000: Update copyrights and readme
Copyrights in sync with "cid-gigabit.2020.06.05.tar.gz released by ND"
(from DPDK).

README from the latest em-7.7.8 on intel.com

Approved by:	imp
MFC after:	1 week

(cherry picked from commit 702cac6c6b)
2021-09-23 18:19:09 -07:00
Vladimir Kondratyev
9faebc1e66 hkbd(4): Fix build on 32bit platforms
(cherry picked from commit 38d2e9314b)
2021-09-23 03:59:37 +03:00
Vladimir Kondratyev
510b003ff4 hkbd(4): Fix key repeats on multireport keyboards
Currently hkbd counts all key states to be "Up" at the start of
interrupt callback. That results in generation of "Key Up" event for
each key that has been downed before but is not listed in current
report while is still downed.

Fix that with clearing of temporary key data storage bits only for
keys contained in processed report.

Reported by:	Greg V
Obtained from:	sysutils/iichid

(cherry picked from commit 598f0580f6)
2021-09-23 03:58:58 +03:00
Vladimir Kondratyev
1dec30a65a hkbd(4): Use bitstring(3) KPI for key bitmaps processing.
No functional changes intended.

(cherry picked from commit 04918395f1)
2021-09-23 03:57:57 +03:00
Vladimir Kondratyev
7683f19cbf hkbd(4): Reduce diff with ukbd(4)
(cherry picked from commit 3ef9023f93)
2021-09-23 03:57:34 +03:00
Vladimir Kondratyev
89edde19d3 psm(4): Disable KVM switch "jitter" clamping for absolute touchpads.
r123442 introduced solution for clamping of PS/2 mice jitter when using
a KVM. Solution is to buffer mouse packets for 0.050ms if mouse activity
has not been seen for more than 0.5 seconds. Then flush that data to driver
if no validation errors found or drop the entire queue otherwise.

While it works well with relative devices it has issues with absolute ones
Depending on history buffering may results in delaying of the touch front
edge for 0.050ms that affects gesture processing (tap detection).

As absolute touchpads usually are built-in devices we can safely disable
bufferization and KVM jitter clamping to avoid such a delays.

(cherry picked from commit bedf31ad7e)
2021-09-23 03:57:08 +03:00
Warner Losh
7716178c0b ppbus: Set the lock for pps interface, update to latest api
Since we take a lock when we enter the ioctl, we need to set driver_mtx
in the pps structure so it can be dropped while sleeping during a call
to timepps_fetch() with a non-zero timeout (PPS_CANWAIT feature).

MFC After:		5 days
Sponsored by:		Netflix
Reviewed by:		ian
Differential Revision:	https://reviews.freebsd.org/D31763

(cherry picked from commit c62aa65b2a)
2021-09-22 08:29:58 -06:00
Hans Petter Selasky
e4cbb47700 Cleanup unused USB enums.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2021-09-22 14:59:31 +02:00
Hans Petter Selasky
1483b121d0 sound(4): Implement playback and recording mode sysctl(8).
The dev.pcm.<N>.mode sysctl(8) gives information if a sound device
supports hardware mixing, playback or recording.

Submitted by:	Christos Margiolis <christos@freebsd.org>
Differential Revision:	https://reviews.freebsd.org/D31320
MFC after:	1 week
Sponsored by:	NVIDIA Networking

(cherry picked from commit ed2196e5df)
2021-09-22 14:59:31 +02:00
Hans Petter Selasky
66e91a9ee1 Implement the SOUND_MIXER_WRITE_MUTE and SOUND_MIXER_READ_MUTE ioctl(9)s.
These two ioctls are not part of the current version of OSS and were
considered obsolete. However, their behaviour is not the same as their
old one, so this implementation is specific to FreeBSD.

Older OSS versions had the MUTE ioctls take and return an integer with
a value of 0 or 1, which meant that the _whole_ mixer is unmuted or
muted respectively. In my implementation, the ioctl takes and returns
a bitmask that tells us which devices are muted.

This allows us to mute and unmute only the devices we want, instead of the
whole mixer. The bitmask works the same way as in DEVMASK, RECMASK and
RECSRC.

Integrated the hardware volume feature with the new mute system.

Submitted by:	Christos Margiolis <christos@freebsd.org>
Differential Revision:	https://reviews.freebsd.org/D31130
MFC after:	1 week
Sponsored by:	NVIDIA Networking

(cherry picked from commit 0f8dafb458)
2021-09-22 14:59:31 +02:00
Hans Petter Selasky
5c4a6f277a sound(4): Fix typos.
Submitted by:	Christos Margiolis <christos@freebsd.org>
Differential Revision:	https://reviews.freebsd.org/D31320
MFC after:	1 week
Sponsored by:	NVIDIA Networking

(cherry picked from commit 132fca6335)
2021-09-22 14:59:31 +02:00
Hans Petter Selasky
929e8e5605 mlx5/mlx4: Bump driver version to 3.7
While at it only output driver version to dmesg(8) when hardware is present.

Differential Revision:	https://reviews.freebsd.org/D29100
MFC after:	1 week
Reviewed by:	kib and markj
Sponsored by:	NVIDIA Networking

(cherry picked from commit d2cbfbc57b)
2021-09-22 14:59:31 +02:00
Vladimir Kondratyev
470478ff01 hmt(4): Add support for touchpads with no "button type" or
"maximum number of contacts" usages.

Assume touchpad to be a clickpad if it has only internal button.
Set number of contacts to 5 for touchpads and to 10 for touchscreens.
Check for fetched report length to avoid reading of stalled data.
Fixes Dell Precision 7550 laptop.

Tested by:	Shawn Webb <shawn.webb_AT_hardenedbsd_DOT_org>
PR:		257992

(cherry picked from commit 9d04336b61)
2021-09-22 02:41:40 +03:00
Vladimir Kondratyev
d4a977ce18 hpen(4): Add support for legacy MS-compatible single touch protocol
It is used by many pre- and post- 2014 eGalax touchscreens.

Tested by:	Mark Kane <mark_AT_kane_DOT_mn>

(cherry picked from commit a36bdfc2b6)
2021-09-22 02:41:16 +03:00
Vladimir Kondratyev
29bcf5e7d7 hidbus(4): Add routine to check presence of collection of given usage
(cherry picked from commit d51e437669)
2021-09-22 02:40:53 +03:00
Vladimir Kondratyev
116adffd0f hidmap: Do not forget to initialize bitmap items to unset state
(cherry picked from commit bbed4b41c9)
2021-09-22 02:40:37 +03:00
Vladimir Kondratyev
1a918f430d hidmap: Implement forbidden flag for hidmap item.
If HID usage is mapped to evdev event by hidmap item marked with this
flag than entire driver attachment is blocked.

(cherry picked from commit cded1fdb37)
2021-09-22 02:40:18 +03:00
Vladimir Kondratyev
12061cf605 hmt(4): Add support for serial packet reporting mode
In Serial mode, each packet contains information that describes a
single physical contact point. Multiple contacts are streamed
serially. In this mode, devices report all contact information in a
series of packets. The device sends a separate packet for each
concurrent contact.

Serial packet reporting mode is used by post-2014 eGalax touchscreens.

Tested by:	Mark Kane <mark_AT_kane_DOT_mn>

(cherry picked from commit 0075742d18)
2021-09-22 02:39:58 +03:00
Vladimir Kondratyev
2cc53be889 psm: Use evdev autorelease feature for Synaptics and Elantech drivers
(cherry picked from commit 744fcd5ad2)
2021-09-22 02:39:20 +03:00
Vladimir Kondratyev
b966556125 psm: Enable touch-tracking for late Synaptics PS/2 touchpads.
They are true multitouch internally but Synaptics PS/2 protocol
limitations do not all allow to export touch identificators.

(cherry picked from commit c21171af68)
2021-09-22 02:38:55 +03:00
Vladimir Kondratyev
d5ed374c40 cyapa(4): Adapt to recent evdev KPI changes
(cherry picked from commit 4836af0d42)
2021-09-22 02:36:40 +03:00
Vladimir Kondratyev
3f03cc9a8e wmt(4): Adapt to recent KPI changes
(cherry picked from commit 527b6d60f8)
2021-09-22 02:36:18 +03:00
Vladimir Kondratyev
3956601292 hmt(4): Adapt to recent KPI changes
(cherry picked from commit 9d8ebe5ea1)
2021-09-22 02:35:58 +03:00
Mark Johnston
fefff1bac5 socket: De-duplicate SBLOCKWAIT() definitions
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit fa0463c384)
2021-09-21 09:37:21 -04:00
Krzysztof Galazka
3917b3c7e5
ixl(4): Fix 2.5 and 5G speeds reporting and update shared code
Fix 2.5 and 5G speeds reporting and update shared code with recent
changes:
- Update expected FW API versions for X710 and X722 adapters
- Define pointers related to Preservation Rules Module
- Add definitions for Shadow RAM pointers to new modules: 5th and 6th
  FPA, and Preservation Rules Module.
- Add I40E_RX_PTYPE_PARSER_ABORTED definition, so the driver will know
  opcode for parser aborted packets.
- Add the new filter types needed for custom cloud filters.
- Add support for Minimum Rollback Revision
- Fix RX_ONLY mode for unicast promiscuous on VLAN
- Add EEE LPI status check for X722 adapters
- Fix PHY type identifiers for 2.5G and 5G adapters
- Fix update link data for X722
- Increase the timeout value for PF reset to give PF more time to finish
  reset if it is loaded with filters.
- Added support for Min Rollback Revision for 4 more X722 modules
- Fix reporting of Active Optical Cable media type
- Add flags and fields for double VLAN processing
- Fix potentially uninitialized variables in NVM code

Reviewed by:	kbowling@, mike.jakubik@gmail.com
Tested by:	gowtham.kumar.ks@intel.com
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D31565

(cherry picked from commit abf774528d)
2021-09-20 13:43:29 -07:00
Krzysztof Galazka
6f6013102b
ixl(4): Fix reporting of unqualified transceivers
When link_active_on_if_down flag is disabled and link is brought down
with ifconfig, FW reports a false positive link event about an
unqualified transceiver. The condition used in the driver to filter out
those false positive events was incorrect and caused that unqualified
module event to also not be reported when the event was valid.

Change the condition to rely on IFF_UP flag instead of
link_active_on_if_down and bump driver version to 2.3.1-k.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	stallamr@netapp.com, erj@
Tested by:	gowtham.kumar.ks@intel.com
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D30733

(cherry picked from commit c4622b01d2)
2021-09-20 13:42:55 -07:00
Krzysztof Galazka
6583e84543
ixl(4): Add tunable to override Flow Control settings
Add flow_control to hw.ixl tunables tree to let override
initial flow control configuration for all interfaces.
Keep using configuration set by NVM by default.

Reviewed by:	erj@, gallatin@
Tested by:	gowtham.kumar.ks_intel.com
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D29338

(cherry picked from commit 20a52706c8)
2021-09-20 13:42:13 -07:00
Kevin Bowling
5f4ba94eb5 e1000: Revert Update intel shared code
This reverts commit fc7682b17f.

This will be done incrementally to help with bisecting an issue in
later I21x devices (ich8lan).

PR:		258153
Approved by:	imp
MFC after:	1 day

(cherry picked from commit a4378873e9)
2021-09-17 17:38:35 -07:00
Mark Johnston
476f87219f wpi: Fix a lock leak in an error path in wpi_run()
PR:		258243
Reported by:	dinghao.liu@zju.edu.cn

(cherry picked from commit 6d042d7c86)
2021-09-17 09:13:44 -04:00
Henri Hennebert
277a326b1e rtsx: Call taskqueue sooner, adjust DELAY(9) calls, add an inversion heuristic
- Some configurations, e.g. HP EliteBook 840 G3, come with a dummy card
in the card slot which is detected as a valid SD card.  This added long
timeout at boot time.  To alleviate the problem, the default timeout is
reduced to one second during the setup phase. [1]

- Some configurations crash at boot if rtsx(4) is defined in the kernel
config.  At boot time, without a card inserted, the driver found that
a card is present and just after that a "spontaneous" interrupt is
generated showing that no card is present.  To solve this problem,
DELAY(9) is set to one quarter of a second before checking card presence
during driver attach.

- As advised by adrian, taskqueue and DMA are set up sooner during
the driver attach.  A heuristic to try to detect configuration needing
inversion was added.

PR:		255130 [1]
Differential Revision:	https://reviews.freebsd.org/D30499

(cherry picked from commit 9d3bc16382)
2021-09-16 09:49:21 -04:00
Alexander Motin
8895170347 bnxt(4): Fix bugs in WOL support.
Before this change driver reported IFCAP_WOL_MAGIC enabled, but not
supported.  It caused errors on some SIOCSIFCAP calls.  Instead
report the support if hardware supports WOL, and enabled status if
it has such filter installed on boot.

Also bnxt_wol_config() should check WOL status in if_getcapenable(),
not in if_getcapabilities() to get current one.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.

(cherry picked from commit 8c14d7da5b)
2021-09-15 21:43:40 -04:00