Note that it is ok to use device_get_desc() as one of the format string
parameters because it is set using device_set_desc() (not
device_set_desc_copy()) and so won't be freed when the description is
updated.
No functional change intended.
MFC after: 1 week
(cherry picked from commit 83caa244bc9eef6949a1250a875ad1409775a46e)
This fixes a panic caused by double free.
PR: kern/279410
Differential Revision: https://reviews.freebsd.org/D45489
(cherry picked from commit b81cbb12410b000074483899e61e9e767ba3ec1d)
Since we e07f9178502b ("sound: Separate implementations for
SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO") support more than
mono/stereo.
Sponsored by: The FreeBSD Foundation
MFC after: 1 day
Reviewed by: dev_submerge.ch, markj, emaste
Differential Revision: https://reviews.freebsd.org/D45605
(cherry picked from commit 914c2b3314e8f6e31833e33cfdcc4843f88fe31b)
Although the docs advise against using them, it doesn't hurt to fill
them out correctly.
Sponsored by: The FreeBSD Foundation
MFC after: 1 day
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D45604
(cherry picked from commit 0f878cdfc5a46cc0dc198e12758f12558dfb1bf6)
If those options are requested when the device is created, ensure that
they will be reported by MDIOCQUERY.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1270
(cherry picked from commit 9d449caddd4f442ba4ebfd2edafa1aef4fcba4c8)
Extend SNDST_DSPS_PROVIDER_INFO for sound(4) to include information
about each channel in a given device, similar to how cat'ing
/dev/sndstat with hw.snd.verbose=2 works.
While here, document all provider_info fields.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D45501
(cherry picked from commit bbca3a75bb412f7106a569b82c616404103be084)
Here we are in a device probe routine with no locks held. M_WAITOK
allocations are ok. No functional change intended.
MFC after: 1 week
(cherry picked from commit a866a40b9b8095a1a31eb22d575535c1f5fbc080)
Multiple issues are reported with WITNESS and code inspection of the
locking and lock initialization.
PR: 278084
(cherry picked from commit 1c45a62a2f667b45ec10a92ad58ff5a34e68b569)
In function qlnx_rdma_deregister_if,
the address of object rdma_if will be printed out.
rdma_if is the address of a global variable qlnxr_drv,
which is passed from dev/qlnx/qlnxr/qlnxr_os.c
A kernel address leakage happens.
Fix this by removing the printf statement.
PR: 238646
(cherry picked from commit 9370f49ad1c4625cd73c4d84d3e42ed3e20fabbf)
QL_DPRINT2 checks the debug level first before printing.
Replace device_printf with QL_DPRINT2 to check debug level
first before printing out the kernel pointers.
PR: 238656
(cherry picked from commit ae389777583dca0e354fdd43aca3413e209160f4)
QL_DPRINT2 checks the debug level first and then prints.
Replace device_printf with QL_DPRINT2 to check debug level
first before printing out the kernel pointers.
PR: 238655
(cherry picked from commit 3d6c7ee87e9d7f3c8f617c3803af3effa8eb8a16)
Almost all code related to the saf1761 driver was removed in commit
44796b7e82, except for two small bits related to saf1761otg support.
This patch completes the removal.
PR: 279302
Signed-off-by: Joshua Kinard <freebsd@kumba.dev>
Reviewed by: mhorne
MFC after: 3 days
Fixes: 44796b7e82 ("mips: remove saf1761")
(cherry picked from commit 80828c6fab0292b5c5a34a63558d837cb9308fbd)
Call the subclassed IF_EQOS_INIT before trying to read the mac, clocks
and reset needs to dealt with before we can read the registers.
(cherry picked from commit bd0771390ef532ce0ae3f39350acd540125e5620)