Driver core fixes for 4.17-rc3
Here are some small driver core and firmware fixes for 4.17-rc3 There's a kobject WARN() removal to make syzkaller a lot happier about some "normal" error paths that it keeps hitting, which should reduce the number of false-positives we have been getting recently. There's also some fimware test and documentation fixes, and the coredump() function signature change that needed to happen after -rc1 before drivers started to take advantage of it. All of these have been in linux-next with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWuMxrw8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ymFpQCg1JM62/W8e6mQ4vdZNQmAzgMKMEMAniOMcVRX /oDWXp64mYwJu+GTxnIJ =+9Gk -----END PGP SIGNATURE----- Merge tag 'driver-core-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg Kroah-Hartman: "Here are some small driver core and firmware fixes for 4.17-rc3 There's a kobject WARN() removal to make syzkaller a lot happier about some "normal" error paths that it keeps hitting, which should reduce the number of false-positives we have been getting recently. There's also some fimware test and documentation fixes, and the coredump() function signature change that needed to happen after -rc1 before drivers started to take advantage of it. All of these have been in linux-next with no reported issues" * tag 'driver-core-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: firmware: some documentation fixes selftests:firmware: fixes a call to a wrong function name kobject: don't use WARN for registration failures firmware: Fix firmware documentation for recent file renames test_firmware: fix setting old custom fw path back on exit, second try test_firmware: Install all scripts drivers: change struct device_driver::coredump() return type to void
This commit is contained in:
Коммит
ee3748be5c
|
@ -17,17 +17,17 @@ an error is returned.
|
||||||
|
|
||||||
request_firmware
|
request_firmware
|
||||||
----------------
|
----------------
|
||||||
.. kernel-doc:: drivers/base/firmware_class.c
|
.. kernel-doc:: drivers/base/firmware_loader/main.c
|
||||||
:functions: request_firmware
|
:functions: request_firmware
|
||||||
|
|
||||||
request_firmware_direct
|
request_firmware_direct
|
||||||
-----------------------
|
-----------------------
|
||||||
.. kernel-doc:: drivers/base/firmware_class.c
|
.. kernel-doc:: drivers/base/firmware_loader/main.c
|
||||||
:functions: request_firmware_direct
|
:functions: request_firmware_direct
|
||||||
|
|
||||||
request_firmware_into_buf
|
request_firmware_into_buf
|
||||||
-------------------------
|
-------------------------
|
||||||
.. kernel-doc:: drivers/base/firmware_class.c
|
.. kernel-doc:: drivers/base/firmware_loader/main.c
|
||||||
:functions: request_firmware_into_buf
|
:functions: request_firmware_into_buf
|
||||||
|
|
||||||
Asynchronous firmware requests
|
Asynchronous firmware requests
|
||||||
|
@ -41,7 +41,7 @@ in atomic contexts.
|
||||||
|
|
||||||
request_firmware_nowait
|
request_firmware_nowait
|
||||||
-----------------------
|
-----------------------
|
||||||
.. kernel-doc:: drivers/base/firmware_class.c
|
.. kernel-doc:: drivers/base/firmware_loader/main.c
|
||||||
:functions: request_firmware_nowait
|
:functions: request_firmware_nowait
|
||||||
|
|
||||||
Special optimizations on reboot
|
Special optimizations on reboot
|
||||||
|
@ -50,12 +50,12 @@ Special optimizations on reboot
|
||||||
Some devices have an optimization in place to enable the firmware to be
|
Some devices have an optimization in place to enable the firmware to be
|
||||||
retained during system reboot. When such optimizations are used the driver
|
retained during system reboot. When such optimizations are used the driver
|
||||||
author must ensure the firmware is still available on resume from suspend,
|
author must ensure the firmware is still available on resume from suspend,
|
||||||
this can be done with firmware_request_cache() insted of requesting for the
|
this can be done with firmware_request_cache() instead of requesting for the
|
||||||
firmare to be loaded.
|
firmware to be loaded.
|
||||||
|
|
||||||
firmware_request_cache()
|
firmware_request_cache()
|
||||||
-----------------------
|
------------------------
|
||||||
.. kernel-doc:: drivers/base/firmware_class.c
|
.. kernel-doc:: drivers/base/firmware_loader/main.c
|
||||||
:functions: firmware_request_cache
|
:functions: firmware_request_cache
|
||||||
|
|
||||||
request firmware API expected driver use
|
request firmware API expected driver use
|
||||||
|
|
|
@ -28,7 +28,7 @@ Device Drivers Base
|
||||||
.. kernel-doc:: drivers/base/node.c
|
.. kernel-doc:: drivers/base/node.c
|
||||||
:internal:
|
:internal:
|
||||||
|
|
||||||
.. kernel-doc:: drivers/base/firmware_class.c
|
.. kernel-doc:: drivers/base/firmware_loader/main.c
|
||||||
:export:
|
:export:
|
||||||
|
|
||||||
.. kernel-doc:: drivers/base/transport_class.c
|
.. kernel-doc:: drivers/base/transport_class.c
|
||||||
|
|
|
@ -168,7 +168,7 @@ update on the CPUs, as discussed below:
|
||||||
|
|
||||||
[Please bear in mind that the kernel requests the microcode images from
|
[Please bear in mind that the kernel requests the microcode images from
|
||||||
userspace, using the request_firmware() function defined in
|
userspace, using the request_firmware() function defined in
|
||||||
drivers/base/firmware_class.c]
|
drivers/base/firmware_loader/main.c]
|
||||||
|
|
||||||
|
|
||||||
a. When all the CPUs are identical:
|
a. When all the CPUs are identical:
|
||||||
|
|
|
@ -537,8 +537,8 @@ exit:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fw_load_sysfs_fallback - load a firmware via the syfs fallback mechanism
|
* fw_load_sysfs_fallback - load a firmware via the sysfs fallback mechanism
|
||||||
* @fw_sysfs: firmware syfs information for the firmware to load
|
* @fw_sysfs: firmware sysfs information for the firmware to load
|
||||||
* @opt_flags: flags of options, FW_OPT_*
|
* @opt_flags: flags of options, FW_OPT_*
|
||||||
* @timeout: timeout to wait for the load
|
* @timeout: timeout to wait for the load
|
||||||
*
|
*
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct firmware_fallback_config - firmware fallback configuratioon settings
|
* struct firmware_fallback_config - firmware fallback configuration settings
|
||||||
*
|
*
|
||||||
* Helps describe and fine tune the fallback mechanism.
|
* Helps describe and fine tune the fallback mechanism.
|
||||||
*
|
*
|
||||||
|
|
|
@ -256,7 +256,9 @@ enum probe_type {
|
||||||
* automatically.
|
* automatically.
|
||||||
* @pm: Power management operations of the device which matched
|
* @pm: Power management operations of the device which matched
|
||||||
* this driver.
|
* this driver.
|
||||||
* @coredump: Called through sysfs to initiate a device coredump.
|
* @coredump: Called when sysfs entry is written to. The device driver
|
||||||
|
* is expected to call the dev_coredump API resulting in a
|
||||||
|
* uevent.
|
||||||
* @p: Driver core's private data, no one other than the driver
|
* @p: Driver core's private data, no one other than the driver
|
||||||
* core can touch this.
|
* core can touch this.
|
||||||
*
|
*
|
||||||
|
@ -288,7 +290,7 @@ struct device_driver {
|
||||||
const struct attribute_group **groups;
|
const struct attribute_group **groups;
|
||||||
|
|
||||||
const struct dev_pm_ops *pm;
|
const struct dev_pm_ops *pm;
|
||||||
int (*coredump) (struct device *dev);
|
void (*coredump) (struct device *dev);
|
||||||
|
|
||||||
struct driver_private *p;
|
struct driver_private *p;
|
||||||
};
|
};
|
||||||
|
|
|
@ -233,13 +233,12 @@ static int kobject_add_internal(struct kobject *kobj)
|
||||||
|
|
||||||
/* be noisy on error issues */
|
/* be noisy on error issues */
|
||||||
if (error == -EEXIST)
|
if (error == -EEXIST)
|
||||||
WARN(1,
|
pr_err("%s failed for %s with -EEXIST, don't try to register things with the same name in the same directory.\n",
|
||||||
"%s failed for %s with -EEXIST, don't try to register things with the same name in the same directory.\n",
|
__func__, kobject_name(kobj));
|
||||||
__func__, kobject_name(kobj));
|
|
||||||
else
|
else
|
||||||
WARN(1, "%s failed for %s (error: %d parent: %s)\n",
|
pr_err("%s failed for %s (error: %d parent: %s)\n",
|
||||||
__func__, kobject_name(kobj), error,
|
__func__, kobject_name(kobj), error,
|
||||||
parent ? kobject_name(parent) : "'none'");
|
parent ? kobject_name(parent) : "'none'");
|
||||||
} else
|
} else
|
||||||
kobj->state_in_sysfs = 1;
|
kobj->state_in_sysfs = 1;
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
all:
|
all:
|
||||||
|
|
||||||
TEST_PROGS := fw_run_tests.sh
|
TEST_PROGS := fw_run_tests.sh
|
||||||
|
TEST_FILES := fw_fallback.sh fw_filesystem.sh fw_lib.sh
|
||||||
|
|
||||||
include ../lib.mk
|
include ../lib.mk
|
||||||
|
|
||||||
|
|
|
@ -154,11 +154,13 @@ test_finish()
|
||||||
if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then
|
if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then
|
||||||
echo "$OLD_TIMEOUT" >/sys/class/firmware/timeout
|
echo "$OLD_TIMEOUT" >/sys/class/firmware/timeout
|
||||||
fi
|
fi
|
||||||
if [ "$OLD_FWPATH" = "" ]; then
|
|
||||||
OLD_FWPATH=" "
|
|
||||||
fi
|
|
||||||
if [ "$TEST_REQS_FW_SET_CUSTOM_PATH" = "yes" ]; then
|
if [ "$TEST_REQS_FW_SET_CUSTOM_PATH" = "yes" ]; then
|
||||||
echo -n "$OLD_FWPATH" >/sys/module/firmware_class/parameters/path
|
if [ "$OLD_FWPATH" = "" ]; then
|
||||||
|
# A zero-length write won't work; write a null byte
|
||||||
|
printf '\000' >/sys/module/firmware_class/parameters/path
|
||||||
|
else
|
||||||
|
echo -n "$OLD_FWPATH" >/sys/module/firmware_class/parameters/path
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -f $FW ]; then
|
if [ -f $FW ]; then
|
||||||
rm -f "$FW"
|
rm -f "$FW"
|
||||||
|
|
|
@ -66,5 +66,5 @@ if [ -f $FW_FORCE_SYSFS_FALLBACK ]; then
|
||||||
run_test_config_0003
|
run_test_config_0003
|
||||||
else
|
else
|
||||||
echo "Running basic kernel configuration, working with your config"
|
echo "Running basic kernel configuration, working with your config"
|
||||||
run_test
|
run_tests
|
||||||
fi
|
fi
|
||||||
|
|
Загрузка…
Ссылка в новой задаче