ARM: dts: imx53-qsb: disable 1.2GHz OPP
Sasha Levin
maintainerPATCH 1/15 ARM: dts: imx53-qsb: disable 1.2GHz OPP
From: Sascha Hauer <[email protected]>
[ Upstream commit eea96566c189c77e5272585984eb2729881a2f1d ]
The maximum CPU frequency for the i.MX53 QSB is 1GHz, so disable the 1.2GHz OPP. This makes the board work again with configs that have cpufreq enabled like imx_v6_v7_defconfig on which the board stopped working with the addition of cpufreq-dt support.
--- arch/arm/boot/dts/imx53-qsb-common.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/imx53-qsb-common.dtsi +11 -0
@@ -130,6 +130,17 @@ }; }; +&cpu0 { + /* CPU rated to 1GHz, not 1.2GHz as per the default settings */ + operating-points = < + /* kHz uV */ + 166666 850000 + 400000 900000 + 800000 1050000 + 1000000 1200000 + >; +}; + &esdhc1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_esdhc1>;
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 2/15 s390/hibernate: fix error handling when suspend cpu != resume cpu
From: Gerald Schaefer <[email protected]>
[ Upstream commit 55a5542a546238354d1f209f794414168cf8c71d ]
The resume code checks if the resume cpu is the same as the suspend cpu. If not, and if it is also not possible to switch to the suspend cpu, an error message should be printed and the resume process should be stopped by loading a disabled wait psw.
The current logic is broken in multiple ways, the message is never printed, and the disabled wait psw never loaded because the kernel panics before that:
- sam31 and SIGP_SET_ARCHITECTURE to ESA mode is wrong, this will break on the first 64bit instruction in sclp_early_printk().
- The init stack should be used, but the stack pointer is not set up correctly (missing aghi %r15,-STACK_FRAME_OVERHEAD).
- __sclp_early_printk() checks the sclp_init_state. If it is not sclp_init_state_uninitialized, it simply returns w/o printing anything. In the resumed kernel however, sclp_init_state will never be uninitialized.
This patch fixes those issues by removing the sam31/ESA logic, adding a correct init stack pointer, and also introducing sclp_early_printk_force() to allow using sclp_early_printk() even when sclp_init_state is not uninitialized.
--- arch/s390/include/asm/sclp.h | 3 ++- arch/s390/kernel/early_printk.c | 2 +- arch/s390/kernel/swsusp.S | 8 +++----- drivers/s390/char/sclp_early_core.c | 11 ++++++++--- 4 files changed, 14 insertions(+), 10 deletions(-)
arch/s390/include/asm/sclp.h +2 -1
@@ -107,7 +107,8 @@ int sclp_early_get_core_info(struct sclp_core_info *info);void sclp_early_get_ipl_info (struct sclp_ipl_info *info);void sclp_early_detect (void );void sclp_early_printk (const char *s); -void __sclp_early_printk (const char *s,unsigned int len); +void sclp_early_printk_force (const char *s); +void __sclp_early_printk (const char *s,unsigned int len,unsigned int force);int _sclp_get_core_info (struct sclp_core_info *info);int sclp_core_configure (u8 core);
arch/s390/kernel/early_printk.c +1 -1
@@ -10,7 +10,7 @@static void sclp_early_write (struct console *con,const char *s,unsigned int len) { -__sclp_early_printk (s, len); +__sclp_early_printk (s, len,0 ); }static struct console sclp_early_console = {
arch/s390/kernel/swsusp.S +3 -5
@@ -198,12 +198,10 @@ pgm_check_entry: /* Suspend CPU not available -> panic */ larl %r15,init_thread_union - ahi %r15,1<<(PAGE_SHIFT+THREAD_SIZE_ORDER) + aghi %r15,1<<(PAGE_SHIFT+THREAD_SIZE_ORDER) + aghi %r15,-STACK_FRAME_OVERHEAD larl %r2,.Lpanic_string - lghi %r1,0 - sam31 - sigp %r1,%r0,SIGP_SET_ARCHITECTURE - brasl %r14,sclp_early_printk + brasl %r14,sclp_early_printk_force larl %r3,.Ldisabled_wait_31 lpsw 0(%r3) 4:
drivers/s390/char/sclp_early_core.c +8 -3
@@ -188,11 +188,11 @@ static int sclp_early_setup(int disable, int *have_linemode, int *have_vt220)* Output one or more lines of text on the SCLP console (VT220 and / * or line-mode). */ -void __sclp_early_printk (const char *str,unsigned int len) +void __sclp_early_printk (const char *str,unsigned int len,unsigned int force) {int have_linemode, have_vt220; -if (sclp_init_state != sclp_init_state_uninitialized) +if (!force && sclp_init_state != sclp_init_state_uninitialized)return ;if (sclp_early_setup (0 , &have_linemode, &have_vt220) !=0 )return ;
@@ -205,5 +205,10 @@ void __sclp_early_printk(const char *str, unsigned int len)void sclp_early_printk (const char *str) { -__sclp_early_printk (str,strlen (str)); +__sclp_early_printk (str,strlen (str),0 ); +} + +void sclp_early_printk_force (const char *str) +{ +__sclp_early_printk (str,strlen (str),1 ); }
Signature · 1 line
2.17.1
Re: [PATCH AUTOSEL 4.14 02/15] s390/hibernate: fix error handling when suspend cpu != resume cpu
Quoted 9 lines · Sasha Levin
From: Gerald Schaefer <[email protected]>
[ Upstream commit
55a5542a546238354d1f209f794414168cf8c71d]The resume code checks if the resume cpu is the same as the suspend cpu. If not, and if it is also not possible to switch to the suspend cpu, an error message should be printed and the resume process should be stopped by loading a disabled wait psw.
Quoted 9 lines
The current logic is broken in multiple ways, the message is never printed, and the disabled wait psw never loaded because the kernel panics before that:
- sam31 andSIGP_SET_ARCHITECTUREto ESA mode is wrong, this will break on the first 64bit instruction insclp_early_printk().
- The init stack should be used, but the stack pointer is not set up correctly (missing aghi %r15,-STACK_FRAME_OVERHEAD).
-__sclp_early_printk()checks thesclp_init_state. If it is notsclp_init_state_uninitialized, it simply returns w/o printing anything. In the resumed kernel however,sclp_init_statewill never be uninitialized.
Stable patches should fix one bug, and one bug only.
pavel
Quoted 84 lines
--- arch/s390/include/asm/sclp.h | 3 ++- arch/s390/kernel/early_printk.c | 2 +- arch/s390/kernel/swsusp.S | 8 +++----- drivers/s390/char/sclp_early_core.c | 11 ++++++++--- 4 files changed, 14 insertions(+), 10 deletions(-)arch/s390/include/asm/sclp.h +2
-1@@ -107,7 +107,8 @@ int sclp_early_get_core_info(struct sclp_core_info *info);void sclp_early_get_ipl_info (struct sclp_ipl_info *info);void sclp_early_detect (void );void sclp_early_printk (const char *s); -void __sclp_early_printk (const char *s,unsigned int len); +void sclp_early_printk_force (const char *s); +void __sclp_early_printk (const char *s,unsigned int len,unsigned int force);int _sclp_get_core_info (struct sclp_core_info *info);int sclp_core_configure (u8 core);arch/s390/kernel/early_printk.c +1
-1@@ -10,7 +10,7 @@static void sclp_early_write (struct console *con,const char *s,unsigned int len) { -__sclp_early_printk (s, len); +__sclp_early_printk (s, len,0 ); }static struct console sclp_early_console = {arch/s390/kernel/swsusp.S +3
-5@@ -198,12 +198,10 @@ pgm_check_entry: /* Suspend CPU not available -> panic */ larl %r15,init_thread_union - ahi %r15,1<<(PAGE_SHIFT+THREAD_SIZE_ORDER) + aghi %r15,1<<(PAGE_SHIFT+THREAD_SIZE_ORDER) + aghi %r15,-STACK_FRAME_OVERHEAD larl %r2,.Lpanic_string - lghi %r1,0 - sam31 - sigp %r1,%r0,SIGP_SET_ARCHITECTURE - brasl %r14,sclp_early_printk + brasl %r14,sclp_early_printk_force larl %r3,.Ldisabled_wait_31 lpsw 0(%r3) 4:drivers/s390/char/sclp_early_core.c +8
-3@@ -188,11 +188,11 @@ static int sclp_early_setup(int disable, int *have_linemode, int *have_vt220)* Output one or more lines of text on the SCLP console (VT220 and / * or line-mode). */ -void __sclp_early_printk (const char *str,unsigned int len) +void __sclp_early_printk (const char *str,unsigned int len,unsigned int force) {int have_linemode, have_vt220; -if (sclp_init_state != sclp_init_state_uninitialized) +if (!force && sclp_init_state != sclp_init_state_uninitialized)return ;if (sclp_early_setup (0 , &have_linemode, &have_vt220) !=0 )return ;@@ -205,5 +205,10 @@ void __sclp_early_printk(const char *str, unsigned int len)void sclp_early_printk (const char *str) { -__sclp_early_printk (str,strlen (str)); +__sclp_early_printk (str,strlen (str),0 ); +} + +void sclp_early_printk_force (const char *str) +{ +__sclp_early_printk (str,strlen (str),1 ); }
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH AUTOSEL 4.14 02/15] s390/hibernate: fix error handling when suspend cpu != resume cpu
Quoted 20 lines · Pavel Machek
Quoted 9 lines · Sasha Levin
From: Gerald Schaefer <[email protected]>
[ Upstream commit
55a5542a546238354d1f209f794414168cf8c71d]The resume code checks if the resume cpu is the same as the suspend cpu. If not, and if it is also not possible to switch to the suspend cpu, an error message should be printed and the resume process should be stopped by loading a disabled wait psw.
Quoted 9 lines
The current logic is broken in multiple ways, the message is never printed, and the disabled wait psw never loaded because the kernel panics before that:
- sam31 andSIGP_SET_ARCHITECTUREto ESA mode is wrong, this will break on the first 64bit instruction insclp_early_printk().
- The init stack should be used, but the stack pointer is not set up correctly (missing aghi %r15,-STACK_FRAME_OVERHEAD).
-__sclp_early_printk()checks thesclp_init_state. If it is notsclp_init_state_uninitialized, it simply returns w/o printing anything. In the resumed kernel however,sclp_init_statewill never be uninitialized.
Quoted 1 line
Stable patches should fix one bug, and one bug only.
So should upstream patches, but the rule of "stable patches match upstream identically" overrules this :)
Re: [PATCH AUTOSEL 4.14 02/15] s390/hibernate: fix error handling when suspend cpu != resume cpu
Quoted 21 lines · Greg KH
Quoted 20 lines · Pavel Machek
Quoted 18 lines · Sasha Levin
From: Gerald Schaefer <[email protected]>
[ Upstream commit
55a5542a546238354d1f209f794414168cf8c71d]The resume code checks if the resume cpu is the same as the suspend cpu. If not, and if it is also not possible to switch to the suspend cpu, an error message should be printed and the resume process should be stopped by loading a disabled wait psw.
The current logic is broken in multiple ways, the message is never printed, and the disabled wait psw never loaded because the kernel panics before that:
- sam31 andSIGP_SET_ARCHITECTUREto ESA mode is wrong, this will break on the first 64bit instruction insclp_early_printk().
- The init stack should be used, but the stack pointer is not set up correctly (missing aghi %r15,-STACK_FRAME_OVERHEAD).
-__sclp_early_printk()checks thesclp_init_state. If it is notsclp_init_state_uninitialized, it simply returns w/o printing anything. In the resumed kernel however,sclp_init_statewill never be uninitialized.
Quoted 4 lines
Quoted 1 line
Stable patches should fix one bug, and one bug only.
So should upstream patches, but the rule of "stable patches match upstream identically" overrules this :)
a) There is no such rule for upstream.
b) You should split the patch if it is important enough.
c) The "stable patches match upstream identically" rule does not exist. Check the documentation.
:-(
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Sasha Levin
maintainerRe: [PATCH AUTOSEL 4.14 02/15] s390/hibernate: fix error handling when suspend cpu != resume cpu
Quoted 22 lines · Pavel Machek
Quoted 21 lines · Greg KH
Quoted 20 lines · Pavel Machek
Quoted 18 lines · Sasha Levin
From: Gerald Schaefer <[email protected]>
[ Upstream commit
55a5542a546238354d1f209f794414168cf8c71d]The resume code checks if the resume cpu is the same as the suspend cpu. If not, and if it is also not possible to switch to the suspend cpu, an error message should be printed and the resume process should be stopped by loading a disabled wait psw.
The current logic is broken in multiple ways, the message is never printed, and the disabled wait psw never loaded because the kernel panics before that:
- sam31 andSIGP_SET_ARCHITECTUREto ESA mode is wrong, this will break on the first 64bit instruction insclp_early_printk().
- The init stack should be used, but the stack pointer is not set up correctly (missing aghi %r15,-STACK_FRAME_OVERHEAD).
-__sclp_early_printk()checks thesclp_init_state. If it is notsclp_init_state_uninitialized, it simply returns w/o printing anything. In the resumed kernel however,sclp_init_statewill never be uninitialized.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Stable patches should fix one bug, and one bug only.
So should upstream patches, but the rule of "stable patches match upstream identically" overrules this :)
a) There is no such rule for upstream.
I invite you to read the docs in Documentation/process/ where you'll find gems like "Each logically independent change should be formatted as a separate patch".
Quoted 4 lines
b) You should split the patch if it is important enough.
c) The "stable patches match upstream identically" rule does not exist. Check the documentation.
The rule in question here is that every patch that goes into -stable must be upstream. If we were to split this patch, it would create 2+ patches that do not exist upstream, thus breaking our own rules.
Anyway, given that this is an upstream issue, I'll also invite you to have this discussion with the maintainer of the subsystem this patch went into; you raise a valid concern which can hopefully be addressed by that maintainer.
--
Thanks,
Sasha
Re: [PATCH AUTOSEL 4.14 02/15] s390/hibernate: fix error handling when suspend cpu != resume cpu
Quoted 39 lines · On Fri, 26 Oct 2018 07:09:20 -0400 Sasha Levin <[email protected]> wrote:
Quoted 22 lines · Pavel Machek
Quoted 21 lines · Greg KH
Quoted 20 lines · Pavel Machek
Quoted 18 lines · Sasha Levin
From: Gerald Schaefer <[email protected]>
[ Upstream commit
55a5542a546238354d1f209f794414168cf8c71d]The resume code checks if the resume cpu is the same as the suspend cpu. If not, and if it is also not possible to switch to the suspend cpu, an error message should be printed and the resume process should be stopped by loading a disabled wait psw.
The current logic is broken in multiple ways, the message is never printed, and the disabled wait psw never loaded because the kernel panics before that:
- sam31 andSIGP_SET_ARCHITECTUREto ESA mode is wrong, this will break on the first 64bit instruction insclp_early_printk().
- The init stack should be used, but the stack pointer is not set up correctly (missing aghi %r15,-STACK_FRAME_OVERHEAD).
-__sclp_early_printk()checks thesclp_init_state. If it is notsclp_init_state_uninitialized, it simply returns w/o printing anything. In the resumed kernel however,sclp_init_statewill never be uninitialized.Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Stable patches should fix one bug, and one bug only.
So should upstream patches, but the rule of "stable patches match upstream identically" overrules this :)
a) There is no such rule for upstream.
I invite you to read the docs in
Documentation/process/where you'll find gems like "Each logically independent change should be formatted as a separate patch".Quoted 4 lines
b) You should split the patch if it is important enough.
c) The "stable patches match upstream identically" rule does not exist. Check the documentation.
Quoted 8 lines
The rule in question here is that every patch that goes into -stable must be upstream. If we were to split this patch, it would create 2+ patches that do not exist upstream, thus breaking our own rules.
Anyway, given that this is an upstream issue, I'll also invite you to have this discussion with the maintainer of the subsystem this patch went into; you raise a valid concern which can hopefully be addressed by that maintainer.
It fixes the error message when suspend cpu != resume cpu, and splitting it up would result in multiple patches where none of them would fix the issue by itself, so they are logically connected.
Anyway, that patch did not have a cc: stable on purpose, it fixes an esoteric special case, where the kernel would end up in disabled wait anyway, with or without the patch. So it would be perfectly fine to not include it in any stable update.
Sasha Levin
maintainerPATCH 3/15 Input: i8042 - enable keyboard wakeups by default when s2idle is used
In reply to Sasha LevinFrom: Daniel Drake <[email protected]>
[ Upstream commit 684bec1092b6991ff2a7751e8a763898576eb5c2 ]
Previously, on typical consumer laptops, pressing a key on the keyboard when the system is in suspend would cause it to wake up (default or unconditional behaviour). This happens because the EC generates a SCI interrupt in this scenario.
That is no longer true on modern laptops based on Intel WhiskeyLake, including Acer Swift SF314-55G, Asus UX333FA, Asus UX433FN and Asus UX533FD. We confirmed with Asus EC engineers that the "Modern Standby" design has been modified so that the EC no longer generates a SCI in this case; the keyboard controller itself should be used for wakeup.
In order to retain the standard behaviour of being able to use the keyboard to wake up the system, enable serio wakeups by default on platforms that are using s2idle.
--- drivers/input/serio/i8042.c | 29 ++++++++++++++++++++--------- include/linux/suspend.h | 2 ++ kernel/power/suspend.c | 6 ++++++ 3 files changed, 28 insertions(+), 9 deletions(-)
drivers/input/serio/i8042.c +20 -9
@@ -1392,15 +1392,26 @@ static void __init i8042_register_ports(void)for (i =0 ; i <I8042_NUM_PORTS ; i++) {struct serio *serio = i8042_ports[i].serio; -if (serio) { -printk (KERN_INFO "serio: %s at %#lx,%#lx irq %d\n" , - serio->name, - (unsigned long )I8042_DATA_REG , - (unsigned long )I8042_COMMAND_REG , - i8042_ports[i].irq); -serio_register_port (serio); -device_set_wakeup_capable (&serio->dev, true); - } +if (!serio) +continue ; + +printk (KERN_INFO "serio: %s at %#lx,%#lx irq %d\n" , + serio->name, + (unsigned long )I8042_DATA_REG , + (unsigned long )I8042_COMMAND_REG , + i8042_ports[i].irq); +serio_register_port (serio); +device_set_wakeup_capable (&serio->dev, true); + +/* +* On platforms using suspend-to-idle, allow the keyboard to +* wake up the system from sleep by enabling keyboard wakeups +* by default. This is consistent with keyboard wakeup +* behavior on many platforms using suspend-to-RAM (ACPI S3) +* by default. +*/ +if (pm_suspend_via_s2idle () && i ==I8042_KBD_PORT_NO ) +device_set_wakeup_enable (&serio->dev, true); } }
include/linux/suspend.h +2 -0
@@ -251,6 +251,7 @@ static inline bool idle_should_enter_s2idle(void)return unlikely (s2idle_state ==S2IDLE_STATE_ENTER ); } +extern bool pm_suspend_via_s2idle (void );extern void __init pm_states_init (void );extern void s2idle_set_ops (const struct platform_s2idle_ops *ops);extern void s2idle_wake (void );
@@ -282,6 +283,7 @@ static inline void pm_set_suspend_via_firmware(void) {}static inline void pm_set_resume_via_firmware (void ) {}static inline bool pm_suspend_via_firmware (void ) {return false; }static inline bool pm_resume_via_firmware (void ) {return false; } +static inline bool pm_suspend_via_s2idle (void ) {return false; }static inline void suspend_set_ops (const struct platform_suspend_ops *ops) {}static inline int pm_suspend (suspend_state_t state) {return -ENOSYS ; }
kernel/power/suspend.c +6 -0
@@ -62,6 +62,12 @@ static DECLARE_WAIT_QUEUE_HEAD(s2idle_wait_head);enum s2idle_states __read_mostly s2idle_state;static DEFINE_RAW_SPINLOCK (s2idle_lock); +bool pm_suspend_via_s2idle (void ) +{ +return mem_sleep_current ==PM_SUSPEND_TO_IDLE ; +} +EXPORT_SYMBOL_GPL (pm_suspend_via_s2idle); +void s2idle_set_ops (const struct platform_s2idle_ops *ops) {lock_system_sleep ();
Signature · 1 line
2.17.1
Re: [PATCH AUTOSEL 4.14 03/15] Input: i8042 - enable keyboard wakeups by default when s2idle is used
Quoted 15 lines · Sasha Levin
From: Daniel Drake <[email protected]>
[ Upstream commit
684bec1092b6991ff2a7751e8a763898576eb5c2]Previously, on typical consumer laptops, pressing a key on the keyboard when the system is in suspend would cause it to wake up (default or unconditional behaviour). This happens because the EC generates a SCI interrupt in this scenario.
That is no longer true on modern laptops based on Intel WhiskeyLake, including Acer Swift SF314-55G, Asus UX333FA, Asus UX433FN and Asus UX533FD. We confirmed with Asus EC engineers that the "Modern Standby" design has been modified so that the EC no longer generates a SCI in this case; the keyboard controller itself should be used for wakeup.
Quoted 3 lines
In order to retain the standard behaviour of being able to use the keyboard to wake up the system, enable serio wakeups by default on platforms that are using s2idle.
Behaviour change, not a bugfix. Someone may like their laptop sleeping after keypress, we should not change it in the middle of -stable series.
Quoted 89 lines
Link https://lkml.kernel.org/r/CAB4CAwfQ0mPMqCLp95TVjw4J0r5zKPWkSvvkK4cpZUGE--w8bQ@mail.gmail.com open hereReviewed-by Rafael J. Wysocki <[email protected]>Signed-off-by Daniel Drake <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- drivers/input/serio/i8042.c | 29 ++++++++++++++++++++--------- include/linux/suspend.h | 2 ++ kernel/power/suspend.c | 6 ++++++ 3 files changed, 28 insertions(+), 9 deletions(-)drivers/input/serio/i8042.c +20
-9@@ -1392,15 +1392,26 @@ static void __init i8042_register_ports(void)for (i =0 ; i <I8042_NUM_PORTS ; i++) {struct serio *serio = i8042_ports[i].serio; -if (serio) { -printk (KERN_INFO "serio: %s at %#lx,%#lx irq %d\n" , - serio->name, - (unsigned long )I8042_DATA_REG , - (unsigned long )I8042_COMMAND_REG , - i8042_ports[i].irq); -serio_register_port (serio); -device_set_wakeup_capable (&serio->dev, true); - } +if (!serio) +continue ; + +printk (KERN_INFO "serio: %s at %#lx,%#lx irq %d\n" , + serio->name, + (unsigned long )I8042_DATA_REG , + (unsigned long )I8042_COMMAND_REG , + i8042_ports[i].irq); +serio_register_port (serio); +device_set_wakeup_capable (&serio->dev, true); + +/* +* On platforms using suspend-to-idle, allow the keyboard to +* wake up the system from sleep by enabling keyboard wakeups +* by default. This is consistent with keyboard wakeup +* behavior on many platforms using suspend-to-RAM (ACPI S3) +* by default. +*/ +if (pm_suspend_via_s2idle () && i ==I8042_KBD_PORT_NO ) +device_set_wakeup_enable (&serio->dev, true); } }include/linux/suspend.h +2
-0@@ -251,6 +251,7 @@ static inline bool idle_should_enter_s2idle(void)return unlikely (s2idle_state ==S2IDLE_STATE_ENTER ); } +extern bool pm_suspend_via_s2idle (void );extern void __init pm_states_init (void );extern void s2idle_set_ops (const struct platform_s2idle_ops *ops);extern void s2idle_wake (void );@@ -282,6 +283,7 @@ static inline void pm_set_suspend_via_firmware(void) {}static inline void pm_set_resume_via_firmware (void ) {}static inline bool pm_suspend_via_firmware (void ) {return false; }static inline bool pm_resume_via_firmware (void ) {return false; } +static inline bool pm_suspend_via_s2idle (void ) {return false; }static inline void suspend_set_ops (const struct platform_suspend_ops *ops) {}static inline int pm_suspend (suspend_state_t state) {return -ENOSYS ; }kernel/power/suspend.c +6
-0@@ -62,6 +62,12 @@ static DECLARE_WAIT_QUEUE_HEAD(s2idle_wait_head);enum s2idle_states __read_mostly s2idle_state;static DEFINE_RAW_SPINLOCK (s2idle_lock); +bool pm_suspend_via_s2idle (void ) +{ +return mem_sleep_current ==PM_SUSPEND_TO_IDLE ; +} +EXPORT_SYMBOL_GPL (pm_suspend_via_s2idle); +void s2idle_set_ops (const struct platform_s2idle_ops *ops) {lock_system_sleep ();
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Sasha Levin
maintainerRe: [PATCH AUTOSEL 4.14 03/15] Input: i8042 - enable keyboard wakeups by default when s2idle is used
Quoted 16 lines · Pavel Machek
Quoted 15 lines · Sasha Levin
From: Daniel Drake <[email protected]>
[ Upstream commit
684bec1092b6991ff2a7751e8a763898576eb5c2]Previously, on typical consumer laptops, pressing a key on the keyboard when the system is in suspend would cause it to wake up (default or unconditional behaviour). This happens because the EC generates a SCI interrupt in this scenario.
That is no longer true on modern laptops based on Intel WhiskeyLake, including Acer Swift SF314-55G, Asus UX333FA, Asus UX433FN and Asus UX533FD. We confirmed with Asus EC engineers that the "Modern Standby" design has been modified so that the EC no longer generates a SCI in this case; the keyboard controller itself should be used for wakeup.
Quoted 7 lines
Quoted 3 lines
In order to retain the standard behaviour of being able to use the keyboard to wake up the system, enable serio wakeups by default on platforms that are using s2idle.
Behaviour change, not a bugfix. Someone may like their laptop sleeping after keypress, we should not change it in the middle of -stable series.
Dmitry already asked for it to be dropped, so it's gone.
--
Thanks,
Sasha
Sasha Levin
maintainerPATCH 4/15 Input: mousedev - add a schedule point in mousedev_write()
In reply to Sasha LevinFrom: Eric Dumazet <[email protected]>
[ Upstream commit f74c371fe72a4f820d287db8067683fb533e4ede ]
syzbot was able to trigger rcu stalls by calling write() with large number of bytes.
Add a cond_resched() in the loop to avoid this.
--- drivers/input/mousedev.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/mousedev.c +1 -0
@@ -707,6 +707,7 @@ static ssize_t mousedev_write(struct file *file, const char __user *buffer,mousedev_generate_response (client, c);spin_unlock_irq (&client->packet_lock); +cond_resched (); }kill_fasync (&client->fasync,SIGIO ,POLL_IN );
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 5/15 perf python: Use -Wno-redundant-decls to build with PYTHON=python3
In reply to Sasha LevinFrom: Arnaldo Carvalho de Melo <[email protected]>
[ Upstream commit 05a2f54679861deb188750ba2a70187000b2c71f ]
When building in ClearLinux using 'make PYTHON=python3' with gcc 8.2.1 it fails with:
GEN /tmp/build/perf/python/perf.so
In file included from /usr/include/python3.7m/Python.h:126,
from /git/linux/tools/perf/util/python.c:2:
/usr/include/python3.7m/import.h:58:24: error: redundant redeclaration of ‘_PyImport_AddModuleObject’ [-Werror=redundant-decls]
PyAPI_FUNC(PyObject *) _PyImport_AddModuleObject(PyObject *, PyObject *);
^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.7m/import.h:47:24: note: previous declaration of ‘_PyImport_AddModuleObject’ was here
PyAPI_FUNC(PyObject *) _PyImport_AddModuleObject(PyObject *name,
^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1
And indeed there is a redundant declaration in that Python.h file, one with parameter names and the other without, so just add -Wno-error=redundant-decls to the python setup instructions.
Now perf builds with gcc in ClearLinux with the following Dockerfile:
# docker.io/acmel/linux-perf-tools-build-clearlinux:latest FROM docker.io/clearlinux:latest MAINTAINER Arnaldo Carvalho de Melo <[email protected]> RUN swupd update && \ swupd bundle-add sysadmin-basic-dev RUN mkdir -m 777 -p /git /tmp/build/perf /tmp/build/objtool /tmp/build/linux && \ groupadd -r perfbuilder && \ useradd -m -r -g perfbuilder perfbuilder && \ chown -R perfbuilder.perfbuilder /tmp/build/ /git/ USER perfbuilder COPY rx_and_build.sh / ENV EXTRA_MAKE_ARGS=PYTHON=python3 ENTRYPOINT ["/rx_and_build.sh"]
Now to figure out why the build fails with clang, that is present in the above container as detected by the rx_and_build.sh script:
clang version 6.0.1 (tags/RELEASE_601/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/sbin
make: Entering directory '/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
HOSTCC /tmp/build/perf/fixdep.o
HOSTLD /tmp/build/perf/fixdep-in.o
LINK /tmp/build/perf/fixdep Auto-detecting system features:
... dwarf: [ OFF ]
... dwarf_getlocations: [ OFF ]
... glibc: [ OFF ]
... gtk2: [ OFF ]
... libaudit: [ OFF ]
... libbfd: [ OFF ]
... libelf: [ OFF ]
... libnuma: [ OFF ]
... numa_num_possible_cpus: [ OFF ]
... libperl: [ OFF ]
... libpython: [ OFF ]
... libslang: [ OFF ]
... libcrypto: [ OFF ]
... libunwind: [ OFF ]
... libdw-dwarf-unwind: [ OFF ]
... zlib: [ OFF ]
... lzma: [ OFF ]
... get_cpuid: [ OFF ]
... bpf: [ OFF ]
Makefile.config:331: *** No gnu/libc-version.h found, please install glibc-dev[el]. Stop. make[1]: *** [Makefile.perf:206: sub-make] Error 2
make: *** [Makefile:70: all] Error 2
make: Leaving directory '/git/linux/tools/perf'
--- tools/perf/util/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/setup.py +1 -1
@@ -27,7 +27,7 @@ class install_lib(_install_lib): cflags = getenv('CFLAGS', '').split() # switch off several checks (need to be at the end of cflags list) -cflags += ['-fno-strict-aliasing', '-Wno-write-strings', '-Wno-unused-parameter' ] +cflags += ['-fno-strict-aliasing', '-Wno-write-strings', '-Wno-unused-parameter', '-Wno-redundant-decls' ] if cc != "clang": cflags += ['-Wno-cast-function-type' ]
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 6/15 Input: evdev - add a schedule point in evdev_write()
In reply to Sasha LevinFrom: Dmitry Torokhov <[email protected]>
[ Upstream commit 36d2582ff235b4e01ad64a734c877a52dc762d9c ]
Large writes to evdev interface may cause rcu stalls. Let's add cond_resched() to the loop to avoid this.
--- drivers/input/evdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/evdev.c +1 -0
@@ -558,6 +558,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer,input_inject_event (&evdev->handle, event.type, event.code, event.value); +cond_resched (); } out:
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 7/15 Input: uinput - add a schedule point in uinput_inject_events()
In reply to Sasha LevinFrom: Dmitry Torokhov <[email protected]>
[ Upstream commit cecf10704899467a787975e3d94a1f0129b9688e ]
Large writes to uinput interface may cause rcu stalls. Let's add cond_resched() to the loop to avoid this.
--- drivers/input/misc/uinput.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/misc/uinput.c +1 -0
@@ -561,6 +561,7 @@ static ssize_t uinput_inject_events(struct uinput_device *udev,input_event (udev->dev, ev.type, ev.code, ev.value); bytes +=input_event_size (); +cond_resched (); }return bytes;
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 8/15 rxrpc: Don't check RXRPC_CALL_TX_LAST after calling rxrpc_rotate_tx_window()
In reply to Sasha LevinFrom: David Howells <[email protected]>
[ Upstream commit c479d5f2c2e1ce609da08c075054440d97ddff52 ]
We should only call the function to end a call's Tx phase if we rotated the marked-last packet out of the transmission buffer.
Make rxrpc_rotate_tx_window() return an indication of whether it just rotated the packet marked as the last out of the transmit buffer, carrying the information out of the locked section in that function.
We can then check the return value instead of examining RXRPC_CALL_TX_LAST.
--- net/rxrpc/input.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-)
net/rxrpc/input.c +19 -16
@@ -216,10 +216,11 @@ static void rxrpc_send_ping(struct rxrpc_call *call, struct sk_buff *skb,/* * Apply a hard ACK by advancing the Tx window. */ -static void rxrpc_rotate_tx_window (struct rxrpc_call *call,rxrpc_seq_t to, +static bool rxrpc_rotate_tx_window (struct rxrpc_call *call,rxrpc_seq_t to,struct rxrpc_ack_summary *summary) {struct sk_buff *skb, *list =NULL ; +bool rot_last = false;int ix;u8 annotation;
@@ -243,15 +244,17 @@ static void rxrpc_rotate_tx_window(struct rxrpc_call *call, rxrpc_seq_t to, skb->next = list; list = skb; -if (annotation &RXRPC_TX_ANNO_LAST ) +if (annotation &RXRPC_TX_ANNO_LAST ) {set_bit (RXRPC_CALL_TX_LAST , &call->flags); + rot_last = true; + }if ((annotation &RXRPC_TX_ANNO_MASK ) !=RXRPC_TX_ANNO_ACK ) summary->nr_rot_new_acks++; }spin_unlock (&call->lock); -trace_rxrpc_transmit (call, (test_bit (RXRPC_CALL_TX_LAST , &call->flags) ? +trace_rxrpc_transmit (call, (rot_last ? rxrpc_transmit_rotate_last : rxrpc_transmit_rotate));wake_up (&call->waitq);
@@ -262,6 +265,8 @@ static void rxrpc_rotate_tx_window(struct rxrpc_call *call, rxrpc_seq_t to, skb->next =NULL ;rxrpc_free_skb (skb, rxrpc_skb_tx_freed); } + +return rot_last; }/*
@@ -332,11 +337,11 @@ static bool rxrpc_receiving_reply(struct rxrpc_call *call) ktime_get_real()); } -if (!test_bit (RXRPC_CALL_TX_LAST , &call->flags)) -rxrpc_rotate_tx_window (call, top, &summary);if (!test_bit (RXRPC_CALL_TX_LAST , &call->flags)) { -rxrpc_proto_abort ("TXL" , call, top); -return false; +if (!rxrpc_rotate_tx_window (call, top, &summary)) { +rxrpc_proto_abort ("TXL" , call, top); +return false; + } }if (!rxrpc_end_tx_phase (call, true,"ETD" ))return false;
@@ -837,8 +842,12 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb,if (nr_acks > call->tx_top - hard_ack)return rxrpc_proto_abort ("AKN" , call,0 ); -if (after (hard_ack, call->tx_hard_ack)) -rxrpc_rotate_tx_window (call, hard_ack, &summary); +if (after (hard_ack, call->tx_hard_ack)) { +if (rxrpc_rotate_tx_window (call, hard_ack, &summary)) { +rxrpc_end_tx_phase (call, false,"ETA" ); +return ; + } + }if (nr_acks >0 ) {if (skb_copy_bits (skb, offset, buf.acks, nr_acks) <0 )
@@ -847,11 +856,6 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb, &summary); } -if (test_bit (RXRPC_CALL_TX_LAST , &call->flags)) { -rxrpc_end_tx_phase (call, false,"ETA" ); -return ; - } - if (call->rxtx_annotations[call->tx_top & RXRPC_RXTX_BUFF_MASK] & RXRPC_TX_ANNO_LAST && summary.nr_acks == call->tx_top - hard_ack &&
@@ -873,8 +877,7 @@ static void rxrpc_input_ackall(struct rxrpc_call *call, struct sk_buff *skb)_proto ("Rx ACKALL %%%u" , sp->hdr.serial); -rxrpc_rotate_tx_window (call, call->tx_top, &summary); -if (test_bit (RXRPC_CALL_TX_LAST , &call->flags)) +if (rxrpc_rotate_tx_window (call, call->tx_top, &summary))rxrpc_end_tx_phase (call, false,"ETL" ); }
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 9/15 rxrpc: Only take the rwind and mtu values from latest ACK
In reply to Sasha LevinFrom: David Howells <[email protected]>
[ Upstream commit 298bc15b2079c324e82d0a6fda39c3d762af7282 ]
Move the out-of-order and duplicate ACK packet check to before the call to rxrpc_input_ackinfo() so that the receive window size and MTU size are only checked in the latest ACK packet and don't regress.
--- net/rxrpc/input.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
net/rxrpc/input.c +10 -9
@@ -806,6 +806,16 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb, rxrpc_propose_ack_respond_to_ack); } +/* Discard any out-of-order or duplicate ACKs. */ +if (before_eq (sp->hdr.serial, call->acks_latest)) { +_debug ("discard ACK %d <= %d" , + sp->hdr.serial, call->acks_latest); +return ; + } + call->acks_latest_ts = skb->tstamp; + call->acks_latest = sp->hdr.serial; + +/* Parse rwind and mtu sizes if provided. */ ioffset = offset + nr_acks +3 ;if (skb->len >= ioffset +sizeof (buf.info)) {if (skb_copy_bits (skb, ioffset, &buf.info,sizeof (buf.info)) <0 )
@@ -827,15 +837,6 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb,return ; } -/* Discard any out-of-order or duplicate ACKs. */ -if (before_eq (sp->hdr.serial, call->acks_latest)) { -_debug ("discard ACK %d <= %d" , - sp->hdr.serial, call->acks_latest); -return ; - } - call->acks_latest_ts = skb->tstamp; - call->acks_latest = sp->hdr.serial; -if (before (hard_ack, call->tx_hard_ack) ||after (hard_ack, call->tx_top))return rxrpc_proto_abort ("AKW" , call,0 );
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 10/15 rxrpc: Fix connection-level abort handling
In reply to Sasha LevinFrom: David Howells <[email protected]>
[ Upstream commit 647530924f47c93db472ee3cf43b7ef1425581b6 ]
Fix connection-level abort handling to cache the abort and error codes properly so that a new incoming call can be properly aborted if it races with the parent connection being aborted by another CPU.
The abort_code and error parameters can then be dropped from rxrpc_abort_calls().
--- net/rxrpc/ar-internal.h | 4 ++-- net/rxrpc/call_accept.c | 4 ++-- net/rxrpc/conn_event.c | 26 +++++++++++++++----------- 3 files changed, 19 insertions(+), 15 deletions(-)
net/rxrpc/ar-internal.h +2 -2
@@ -424,8 +424,7 @@ struct rxrpc_connection {spinlock_t state_lock;/* state-change lock */ enum rxrpc_conn_cache_state cache_state;enum rxrpc_conn_proto_state state;/* current state of connection */ -u32 local_abort;/* local abort code */ -u32 remote_abort;/* remote abort code */ +u32 abort_code;/* Abort code of connection abort */ int debug_id;/* debug ID for printks */ atomic_t serial;/* packet serial number counter */ unsigned int hi_serial;/* highest serial number received */
@@ -435,6 +434,7 @@ struct rxrpc_connection {u8 security_size;/* security header size */ u8 security_ix;/* security type */ u8 out_clientflag;/* RXRPC_CLIENT_INITIATED if we are client */ +short error;/* Local error code */ };/*
net/rxrpc/call_accept.c +2 -2
@@ -418,11 +418,11 @@ struct rxrpc_call *rxrpc_new_incoming_call(struct rxrpc_local *local,case RXRPC_CONN_REMOTELY_ABORTED :rxrpc_set_call_completion (call,RXRPC_CALL_REMOTELY_ABORTED , - conn->remote_abort, -ECONNABORTED ); + conn->abort_code, conn->error);break ;case RXRPC_CONN_LOCALLY_ABORTED :rxrpc_abort_call ("CON" , call, sp->hdr.seq, - conn->local_abort, -ECONNABORTED ); + conn->abort_code, conn->error);break ;default :BUG ();
net/rxrpc/conn_event.c +15 -11
@@ -117,7 +117,7 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,switch (chan->last_type) {case RXRPC_PACKET_TYPE_ABORT : -_proto ("Tx ABORT %%%u { %d } [re]" , serial, conn->local_abort); +_proto ("Tx ABORT %%%u { %d } [re]" , serial, conn->abort_code);break ;case RXRPC_PACKET_TYPE_ACK : trace_rxrpc_tx_ack(NULL, serial, chan->last_seq, 0,
@@ -135,13 +135,12 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,* pass a connection-level abort onto all calls on that connection */ static void rxrpc_abort_calls (struct rxrpc_connection *conn, -enum rxrpc_call_completion compl, -u32 abort_code,int error) +enum rxrpc_call_completion compl) {struct rxrpc_call *call;int i; -_enter ("{%d},%x" , conn->debug_id, abort_code); +_enter ("{%d},%x" , conn->debug_id, conn->abort_code);spin_lock (&conn->channel_lock);
@@ -153,9 +152,11 @@ static void rxrpc_abort_calls(struct rxrpc_connection *conn,if (compl ==RXRPC_CALL_LOCALLY_ABORTED )trace_rxrpc_abort ("CON" , call->cid, call->call_id,0 , - abort_code, error); + conn->abort_code, + conn->error);if (rxrpc_set_call_completion (call, compl, - abort_code, error)) + conn->abort_code, + conn->error))rxrpc_notify_socket (call); } }
@@ -188,10 +189,12 @@ static int rxrpc_abort_connection(struct rxrpc_connection *conn,return 0 ; } + conn->error = error; + conn->abort_code = abort_code; conn->state =RXRPC_CONN_LOCALLY_ABORTED ;spin_unlock_bh (&conn->state_lock); -rxrpc_abort_calls (conn,RXRPC_CALL_LOCALLY_ABORTED , abort_code, error); +rxrpc_abort_calls (conn,RXRPC_CALL_LOCALLY_ABORTED ); msg.msg_name = &conn->params.peer->srx.transport; msg.msg_namelen = conn->params.peer->srx.transport_len;
@@ -210,7 +213,7 @@ static int rxrpc_abort_connection(struct rxrpc_connection *conn, whdr._rsvd =0 ; whdr.serviceId =htons (conn->service_id); - word =htonl (conn->local_abort); + word =htonl (conn->abort_code); iov[0 ].iov_base = &whdr; iov[0 ].iov_len =sizeof (whdr);
@@ -221,7 +224,7 @@ static int rxrpc_abort_connection(struct rxrpc_connection *conn, serial =atomic_inc_return (&conn->serial); whdr.serial =htonl (serial); -_proto ("Tx CONN ABORT %%%u { %d }" , serial, conn->local_abort); +_proto ("Tx CONN ABORT %%%u { %d }" , serial, conn->abort_code); ret =kernel_sendmsg (conn->params.local->socket, &msg, iov,2 , len);if (ret <0 ) {
@@ -289,9 +292,10 @@ static int rxrpc_process_event(struct rxrpc_connection *conn, abort_code =ntohl (wtmp);_proto ("Rx ABORT %%%u { ac=%d }" , sp->hdr.serial, abort_code); + conn->error = -ECONNABORTED ; + conn->abort_code = abort_code; conn->state =RXRPC_CONN_REMOTELY_ABORTED ; -rxrpc_abort_calls (conn,RXRPC_CALL_REMOTELY_ABORTED , - abort_code, -ECONNABORTED ); +rxrpc_abort_calls (conn,RXRPC_CALL_REMOTELY_ABORTED );return -ECONNABORTED ;case RXRPC_PACKET_TYPE_CHALLENGE :
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 11/15 net: ena: fix warning in rmmod caused by double iounmap
In reply to Sasha LevinFrom: Arthur Kiyanovski <[email protected]>
[ Upstream commit d79c3888bde6581da7ff9f9d6f581900ecb5e632 ]
Memory mapped with devm_ioremap is automatically freed when the driver is disconnected from the device. Therefore there is no need to explicitly call devm_iounmap.
--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/net/ethernet/amazon/ena/ena_netdev.c +1 -8
@@ -3059,15 +3059,8 @@ static int ena_rss_init_default(struct ena_adapter *adapter)static void ena_release_bars (struct ena_com_dev *ena_dev,struct pci_dev *pdev) { -int release_bars; +int release_bars =pci_select_bars (pdev,IORESOURCE_MEM ) &ENA_BAR_MASK ; -if (ena_dev->mem_bar) -devm_iounmap (&pdev->dev, ena_dev->mem_bar); - -if (ena_dev->reg_bar) -devm_iounmap (&pdev->dev, ena_dev->reg_bar); - - release_bars =pci_select_bars (pdev,IORESOURCE_MEM ) &ENA_BAR_MASK ;pci_release_selected_regions (pdev, release_bars); }
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 12/15 net: ena: fix NULL dereference due to untimely napi initialization
In reply to Sasha LevinFrom: Arthur Kiyanovski <[email protected]>
[ Upstream commit 78a55d05def95144ca5fa9a64c49b2a0636a9866 ]
napi poll functions should be initialized before running request_irq(), to handle a rare condition where there is a pending interrupt, causing the ISR to fire immediately while the poll function wasn't set yet, causing a NULL dereference.
--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/ethernet/amazon/ena/ena_netdev.c +7 -2
@@ -1571,8 +1571,6 @@ static int ena_up_complete(struct ena_adapter *adapter)if (rc)return rc; -ena_init_napi (adapter); -ena_change_mtu (adapter->netdev, adapter->netdev->mtu);ena_refill_all_rx_bufs (adapter);
@@ -1726,6 +1724,13 @@ static int ena_up(struct ena_adapter *adapter)ena_setup_io_intr (adapter); +/* napi poll functions should be initialized before running +* request_irq(), to handle a rare condition where there is a pending +* interrupt, causing the ISR to fire immediately while the poll +* function wasn't set yet, causing a null dereference +*/ +ena_init_napi (adapter); + rc =ena_request_io_irq (adapter);if (rc) goto err_req_irq;
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 13/15 libertas: call into generic suspend code before turning off power
In reply to Sasha LevinFrom: Daniel Mack <[email protected]>
[ Upstream commit 4f666675cdff0b986195413215eb062b7da6586f ]
When powering down a SDIO connected card during suspend, make sure to call into the generic lbs_suspend() function before pulling the plug. This will make sure the card is successfully deregistered from the system to avoid communication to the card starving out.
--- drivers/net/wireless/marvell/libertas/if_sdio.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/wireless/marvell/libertas/if_sdio.c +4 -0
@@ -1317,6 +1317,10 @@ static int if_sdio_suspend(struct device *dev)if (priv->wol_criteria ==EHS_REMOVE_WAKEUP ) {dev_info (dev,"Suspend without wake params -- powering down card\n" );if (priv->fw_ready) { + ret =lbs_suspend (priv); +if (ret) +return ret; + priv->power_up_on_resume = true;if_sdio_power_off (card); }
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 14/15 selftests: rtnetlink.sh explicitly requires bash.
In reply to Sasha LevinFrom: Paolo Abeni <[email protected]>
[ Upstream commit 3c718e677c2b35b449992adc36ecce883c467e98 ]
the script rtnetlink.sh requires a bash-only features (sleep with sub-second precision). This may cause random test failure if the default shell is not bash.
Address the above explicitly requiring bash as the script interpreter.
--- tools/testing/selftests/net/rtnetlink.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/rtnetlink.sh +1 -1
@@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # This test is for checking rtnetlink callpaths, and get as much coverage as possible. #
Signature · 1 line
2.17.1
Sasha Levin
maintainerPATCH 15/15 fs/fat/fatent.c: add cond_resched() to fat_count_free_clusters()
In reply to Sasha LevinFrom: Khazhismel Kumykov <[email protected]>
[ Upstream commit ac081c3be3fae6d0cc3e1862507fca3862d30b67 ]
On non-preempt kernels this loop can take a long time (more than 50 ticks) processing through entries.
--- fs/fat/fatent.c | 1 + 1 file changed, 1 insertion(+)
fs/fat/fatent.c +1 -0
@@ -681,6 +681,7 @@ int fat_count_free_clusters(struct super_block *sb)if (ops->ent_get (&fatent) ==FAT_ENT_FREE ) free++; }while (fat_ent_next (sbi, &fatent)); +cond_resched (); } sbi->free_clusters = free; sbi->free_clus_valid =1 ;
Signature · 1 line
2.17.1