Commit graph

39853 commits

Author SHA1 Message Date
Hans Petter Selasky
026e19496c urtw(4): Adjust all pause calls to use milliseconds instead of ticks.
Sponsored by:	NVIDIA Networking

(cherry picked from commit c6c22ebb38)
2022-06-16 04:55:52 +02:00
Hans Petter Selasky
1c5c1e4486 upgt(4): Adjust all pause calls to use milliseconds instead of ticks.
Sponsored by:	NVIDIA Networking

(cherry picked from commit bc2e447338)
2022-06-16 04:55:52 +02:00
Hans Petter Selasky
be3f667388 mlx4core: Use-after-free causes a resource leak in flow-steering detach
mlx4_QP_FLOW_STEERING_DETACH_wrapper first removes the steering
rule (which results in freeing the rule structure), and then
references a field in this struct (the qp number) when releasing the
busy-status on the rule's qp.

Since this memory was freed, it could reallocated and changed.
Therefore, the qp number in the struct may be incorrect,
so that we are releasing the incorrect qp. This leaves the rule's qp
in the busy state (and could possibly release an incorrect qp as well).

Fix this by saving the qp number in a local variable, for use after
removing the steering rule.

Linux commit:
3b01fe7f91c8e4f9afc4fae3c5af72c14958d2d8

PR:	     	264469
Sponsored by:	NVIDIA Networking

(cherry picked from commit dd2a8c8f72)
2022-06-14 11:39:23 +02:00
Gordon Bergling
ca753c6495 al_eth: Fix a typo in a source code comment
- s/enought/enough/

(cherry picked from commit 45b143d2ea)
2022-06-10 14:33:13 +02:00
Gordon Bergling
836ade5e8f amdsbwd(4): Fix a typo in a source code comment
- s/accross/across/

(cherry picked from commit 68c0bd3e3f)
2022-06-10 14:32:22 +02:00
Gordon Bergling
a270ec979f nvmw(4): Fix a typo in a source code comment
- s/inaccessable/inaccessible/

(cherry picked from commit 6e8ab6715d)
2022-06-10 14:31:11 +02:00
Gordon Bergling
aa5c134817 aic7xxx: Fix a few typos in comments and an error message
- s/directrive/directive/
- s/specifiled/specified/
- s/Decend/Descend/
- s/tranversal/transversal/

Obtained from:	NetBSD

(cherry picked from commit d35e1c29a9)
2022-06-10 14:29:50 +02:00
Gordon Bergling
466a3ed5c3 ena(4): Fix a typo in a source code comment
- s/entred/entered/

(cherry picked from commit eb3f25b413)
2022-06-10 14:29:20 +02:00
Gordon Bergling
a9d1abf00e sound(4): Fix a typo in a source code comment
- s/alltogether/altogether/

(cherry picked from commit 70311ccffc)
2022-06-10 14:28:55 +02:00
Gordon Bergling
80bc6e0126 hptmv(4): Fix a typo in a source code comment
- s/continous/continuous/

(cherry picked from commit bbb0ca45f8)
2022-06-10 14:28:42 +02:00
Gordon Bergling
abcfcce068 le(4): Fix a typo in a source code comment
- s/brodcast/broadcast/

(cherry picked from commit b008ab622c)
2022-06-10 14:28:14 +02:00
Gordon Bergling
e59da6ed98 if_sis(4): Fix a typo in a source code comment
- s/emperical/empirical/

(cherry picked from commit 3c2ea3ca28)
2022-06-10 14:26:53 +02:00
Gordon Bergling
1dceda2ccd aic79xx: Fix a typo in a source code comment
- s/Disble/Disable/

Obtained from:	NetBSD

(cherry picked from commit 2cada72c65)
2022-06-10 14:26:12 +02:00
Gordon Bergling
59a480875d qlnxe(4): Fix a typo in a source code comment
- s/indepent/independent/

(cherry picked from commit a87f167c41)
2022-06-10 14:25:08 +02:00
Gordon Bergling
0fa1bbeebc twe(4): Fix a common typo in a source code comment
- s/independant/independent/

(cherry picked from commit 508a46c745)
2022-06-10 14:24:54 +02:00
Gordon Bergling
8b5309ab25 qlxgbe(4): Fix a common typo in a source code comment
- s/independant/independent/

(cherry picked from commit f129473702)
2022-06-10 14:24:40 +02:00
Gordon Bergling
3d5aa46fc6 ffec: Fix a common typo in a source code comment
- s/independant/independent/

(cherry picked from commit d3e0919b56)
2022-06-10 14:24:11 +02:00
Gordon Bergling
c7aa67863c if_age(4): Fix a typo in a source code comment
- s/indepent/independent/

(cherry picked from commit f207bdd2cc)
2022-06-10 14:23:57 +02:00
Gordon Bergling
402a483124 mlx(4): Fix a common typo in a source code comment
- s/independant/independent/

(cherry picked from commit 9ae6b386ab)
2022-06-10 14:23:42 +02:00
Gordon Bergling
cc57e03523 ixgbe(4): Fix common typos in source code comments
- s/filer/filter/

Obtained from:	NetBSD

(cherry picked from commit cd7e11f78d)
2022-06-10 14:22:46 +02:00
Hans Petter Selasky
d264494e98 mlx4core: Fix a memory leak when deleting slave's resources
mlx4_delete_all_resources_for_slave() in the resource tracker should free
all memory allocated for a slave. While releasing memory of fs_rule,
it misses releasing memory of fs_rule->mirr_mbox.

Linux commit:
461d5f1b59490ce0096dfda45e10038c122a7892

PR:		264249
Sponsored by:	NVIDIA Networking

(cherry picked from commit f29c9901a4)
2022-06-07 08:44:29 +02:00
Hans Petter Selasky
267e6442d0 mlx4: Fix a memory leak bug.
In function mlx4_opreq_action(), pointer "mailbox" is not released,
when mlx4_cmd_box() return and error, causing a memory leak bug.
Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can
free this pointer.

Linux commit:
febfd9d3c7f74063e8e630b15413ca91b567f963

PR:		264056
Sponsored by:	NVIDIA Networking

(cherry picked from commit 527762b2f7)
2022-06-07 08:44:28 +02:00
Emmanuel Vadot
b203d3de6b backlight: Update cached value when getting the brightness
External events can cause the backlight level to change (AC adapter
plug/unplug for example) so cache the value there too.

PR:		257796
Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	1 week

(cherry picked from commit e26ef41f79)
2022-06-01 09:12:18 +02:00
Kevin Bowling
0cfe15ba9f igc: Increase rx_buffer_size local variable to 32b
Apply 6987c47569 to igc. This is not
expected to have any benefit on current parts with current observed PBA
sizes but will avoid surprises if they are increased in future chips.

Approved by:	grehan
Differential Revision:	https://reviews.freebsd.org/D35217

(cherry picked from commit 9b88ecd674)
2022-05-20 09:36:54 -07:00
John Baldwin
6967516a27 qlxgb/qlxgbe/qlxge: Fix build without INET and/or without INET6.
This is in preparation for adding these drivers to amd64 NOTES.

(cherry picked from commit 618aa8cd0a)
2022-05-19 17:22:07 -07:00
John Baldwin
e6464fce46 nvdimm_e820: Use driver->name in identify method.
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D35077

(cherry picked from commit 216ca4cee1)
2022-05-19 15:01:50 -07:00
John Baldwin
80893ea32b pbio: Add locking and remove D_NEEDGIANT.
Use a sx lock to permit uiomove directly into/out of the the per-port
buffers.  In addition, the sx lock provides a stronger guarantee that
I think this driver wants which is to single-thread read and write
calls even while paused.  Finally, replace tsleep with dummy wait
channels with calls to pause_sig to more clearly communicate the
intent.

Differential Revision:	https://reviews.freebsd.org/D35081

(cherry picked from commit 51f481235c)
2022-05-19 15:01:50 -07:00
John Baldwin
bde0080b3d pbio: Return BUS_PROBE_DEFAULT from probe instead of 0.
0 should only be returned from probe in legacy drivers that need to
preserve softc state between probe and attach.

Differential Revision:	https://reviews.freebsd.org/D35080

(cherry picked from commit 4942e8df47)
2022-05-19 15:01:50 -07:00
John Baldwin
c6960a6881 pbio: Axe bus_space tag/handle using bus_read/write_1 instead.
Differential Revision:	https://reviews.freebsd.org/D35079

(cherry picked from commit bb81a138c3)
2022-05-19 15:01:50 -07:00
John Baldwin
f02bf967fc pbio: Store softc in si_drv1 for character devices.
The port number is still stored in the unit (si_drv0) but is the
entire unit value now.

While here, removed checks for NULL softc since those can never happen
from cdevsw routines.  This also resulted in the close method becoming
a no-op, so it has been removed.

Differential Revision:	https://reviews.freebsd.org/D35078

(cherry picked from commit 0db65574bb)
2022-05-19 15:01:50 -07:00
John Baldwin
7fe4c7b59e acpi_toshiba: Use device_get_softc in attach.
Rather than a detour via the devclass and hardcoding unit 0.

While here, remove a check for sc being NULL.  It will never be NULL
when attach is called.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D35010

(cherry picked from commit 1ac10fa429)
2022-05-19 14:33:09 -07:00
John Baldwin
d2ebb215b8 arcmsr: Remove never-true NULL check from cdev callbacks.
si_drv1 will always hold a non-NULL pointer.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D35005

(cherry picked from commit 108adb2ff5)
2022-05-19 14:33:02 -07:00
John Baldwin
aee33ff467 pcm: Remove dead code from sound_modevent.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D34997

(cherry picked from commit 8109ec9d89)
2022-05-19 14:32:56 -07:00
John Baldwin
da567228b6 arcmsr: Store softc pointer in si_drv1 of cdev.
Rather than fetching the softc using the controller's unit number as
an index into the devclass.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D35004

(cherry picked from commit a9e5e04e64)
2022-05-19 14:32:50 -07:00
John Baldwin
b4600b1378 hptiop: Store softc pointer in si_drv1 of cdev.
Rather than fetching the softc using the controller's unit number as
an index into the devclass.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D34993

(cherry picked from commit 517a8a715a)
2022-05-19 14:31:53 -07:00
Adam S
d7417aa55e asmc: Update Mac Pro 6 sensor definitions
- Make descriptions a bit more human-friendly.
- Don't attempt to probe fan safe speeds, this model does not provide
  one.

PR:		260781

(cherry picked from commit dc484aed0a)
2022-05-18 17:16:01 -04:00
Trev
d6fe8a8eab asmc: Add support for Macmini 5,1 (2011) and 5,3 and 7,1 (2014) models
PR:		262456

(cherry picked from commit 601abb300c)
2022-05-18 17:15:58 -04:00
Mark Johnston
180ab9d85b asmc: Style
(cherry picked from commit a31b0c0c47)
2022-05-18 17:15:56 -04:00
Daniel W. Delâtre
4bb64770b3 asmc: Add support for MacBook Pro 9,1 (mid 2012)
PR:		261981

(cherry picked from commit 79291c9baf)
2022-05-18 17:15:53 -04:00
Mark Johnston
cd613d7cd9 asmc: Make the model table const and local to asmc.c
No functional change intended.

(cherry picked from commit 27d4c6f86e)
2022-05-18 17:15:51 -04:00
Adam S
1610a56a56 asmc: Add support for MacPro 6,1 (2013)
PR:		260781

(cherry picked from commit 7d5fef1837)
2022-05-18 17:15:47 -04:00
Mark Johnston
85f0cdff6f asmc: Add support for MacBook Air 4,1 and 4,2 (2011)
PR:		218574
Submitted by:	NapoleonWils0n <t43InvisibleMan@gmail.com>
Submitted by:	John Hay <john@sanren.ac.za>

(cherry picked from commit 308340cce2)
2022-05-18 17:15:43 -04:00
Kevin Bowling
49d682cb1a igc: Update PCI IDs
bf0aa72f:
igc: Update PCI IDs
I226-K PCI ID got clarified by intel. Add a new I226 ID while here.

Approved by:	grehan
Differential Revision:	https://reviews.freebsd.org/D35218

48a1a6be:
igc: Fix typo in PCI ID define usage

Reported by:	jenkins
Fixes:	bf0aa72f1f igc: Update PCI IDs

(cherry picked from commit bf0aa72f1f)
(cherry picked from commit 48a1a6be19)
2022-05-17 17:30:36 -07:00
Ed Maste
d7620b6ec9 Add deprecation notices to ISA sound cards
ISA sound cards (and ISA itself) are long obsolete.  NYCBUG dmesgd has
no entries for any of these devices after 2005.

Mail to -current and -stable revealed some nostalgic interest, but
no offers to test or requests to pospone the deprecation.

Add deprecation notices to device attach routines and man pages for:

snd_ad1816  Analog Devices AD1816 SoundPort
snd_ess     Ensoniq ESS
snd_gusc    Gravis UltraSound (MAX and newer AFAIK)
snd_mss     Microsoft Sound System
snd_sbc     Creative Sound Blaster

Reviewed by:	cy, mav
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34604

(cherry picked from commit e39ec8933b)
2022-05-16 09:51:23 -04:00
Mitchell Horne
65c10f12df vt: use TERMINAL_DECLARE_EARLY() macro
It simplifies the declaration of the driver structures a little. There
are no current consumers of this macro, in fact it looks like it was
added for exactly this purpose.

This decreases the scope of some variables, so rework the initialization
in vt_init_logos() such that it doesn't require them.

No functional change intended.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34820

(cherry picked from commit ff1c8af8c3)
2022-05-16 10:34:04 -03:00
Milan Obuch
fe1c0e6d2a cgem: support SGMII PHY connection mode
As the PolarFire SoC needs SGMII to connect the PHY, check the
'phy-mode' property of device tree node for ethernet and act on it
appropriately.

Add the compatible strings for the PolarFire SoC device tree.
'microchip,mpfs-mss-gem" is not officially documented but has been
observed in the available firmware for this platform, so it is included
for now.

Also, fix a typo in if_cgem_hw.h.

Reviewed by:	mhorne
MFC after:	1 week
Sponsored by:	Conclusive Engineering
Differential Revision: https://reviews.freebsd.org/D34764

(cherry picked from commit 34f4c17a2b)
2022-05-16 10:34:04 -03:00
Milan Obuch
a1785a3009 cgem: rework hardware quirk detection
Rather than doing these checks based on the detected hardware variant, allow
quirks to be specified as a set of flags for each compatible string.
This simplifies adding support for new compatible hardware.

Reviewed by:	mhorne
MFC after:	1 week
Sponsored by:	Conclusive Engineering
Differential Revision:	https://reviews.freebsd.org/D34764

(cherry picked from commit 66cc0c61b0)
2022-05-16 10:34:04 -03:00
Emmanuel Vadot
1fa3912aa2 cpufreq: dt: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit eb80ba8d54)
2022-05-16 15:15:45 +02:00
Emmanuel Vadot
f379ab270c twsi: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 4f118605ad)
2022-05-16 15:15:44 +02:00
Emmanuel Vadot
3485ff9587 if_dwc: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 79778f8692)
2022-05-16 15:15:44 +02:00