Re: [PATCH] firmware_class: make firmware caching configurable

From: Mark Salyzyn
Date: Wed Nov 13 2019 - 17:33:49 EST


On 11/13/19 1:50 PM, Greg Kroah-Hartman wrote:
On Wed, Nov 13, 2019 at 01:01:13PM -0800, Mark Salyzyn wrote:
Because firmware caching generates uevent messages that are sent over
a netlink socket, it can prevent suspend on many platforms. It's
also not always useful, so make it a configurable option.

Signed-off-by: Mark Salyzyn <salyzyn@xxxxxxxxxxx>
Cc: Tim Murray <timmurray@xxxxxxxxxx>
Cc: Venkata Narendra Kumar Gutta <vnkgutta@xxxxxxxxxxxxxx>
Acked-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
---
drivers/base/Kconfig | 13 +++++++++++++
drivers/base/firmware_loader/main.c | 6 +++---
2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index 28b92e3cc570..36351c3a62b0 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -89,6 +89,19 @@ config PREVENT_FIRMWARE_BUILD
source "drivers/base/firmware_loader/Kconfig"
+config FW_CACHE
+ bool "Enable firmware caching during suspend"
+ depends on PM_SLEEP
+ default y
+ help
+ Because firmware caching generates uevent messages that are sent
+ over a netlink socket, it can prevent suspend on many platforms.
+ It is also not always useful, so on such platforms we have the
+ option.
+
+ If unsure, say Y.
+
+
Shouldn't this entry go into drivers/base/firmware_loader/Kconfig
instead and depend on FW_LOADER by putting it in the correct location in
that file?

Good point, respin on its way.


Also, no need for two blank lines.
<not sure how the double lines showed up, checkpatch,pl should look for this>

And finally, 'default y' is only a good idea if your machine can not
boot without the option. I don't think that's the case here, correct?

thanks,

greg k-h

I am concerned about the change in user space behavior and to prevent defconfig churn.