From d85b3256cd10425d3b15c6cb7f78e2f3284b9bbf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 6 May 2013 11:22:29 -0700 Subject: [PATCH] 3.0-stable patches added patches: mfd-adp5520-restore-mode-bits-on-resume.patch mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch --- ...-adp5520-restore-mode-bits-on-resume.patch | 53 +++++++++++++++++++ ...width-test-failing-on-old-emmc-cards.patch | 42 +++++++++++++++ queue-3.0/series | 3 ++ ...q_mis_count-counted-in-arch_irq_stat.patch | 42 +++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 queue-3.0/mfd-adp5520-restore-mode-bits-on-resume.patch create mode 100644 queue-3.0/mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch create mode 100644 queue-3.0/x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch diff --git a/queue-3.0/mfd-adp5520-restore-mode-bits-on-resume.patch b/queue-3.0/mfd-adp5520-restore-mode-bits-on-resume.patch new file mode 100644 index 00000000000..874f6f0151e --- /dev/null +++ b/queue-3.0/mfd-adp5520-restore-mode-bits-on-resume.patch @@ -0,0 +1,53 @@ +From c6cc25fda58da8685ecef3f179adc7b99c8253b2 Mon Sep 17 00:00:00 2001 +From: Lars-Peter Clausen +Date: Tue, 19 Feb 2013 11:51:22 +0100 +Subject: mfd: adp5520: Restore mode bits on resume + +From: Lars-Peter Clausen + +commit c6cc25fda58da8685ecef3f179adc7b99c8253b2 upstream. + +The adp5520 unfortunately also clears the BL_EN bit when the nSTNDBY bit is +cleared. So we need to make sure to restore it during resume if it was set +before suspend. + +Signed-off-by: Lars-Peter Clausen +Acked-by: Michael Hennerich +Signed-off-by: Samuel Ortiz +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mfd/adp5520.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/mfd/adp5520.c ++++ b/drivers/mfd/adp5520.c +@@ -36,6 +36,7 @@ struct adp5520_chip { + struct blocking_notifier_head notifier_list; + int irq; + unsigned long id; ++ uint8_t mode; + }; + + static int __adp5520_read(struct i2c_client *client, +@@ -326,7 +327,10 @@ static int adp5520_suspend(struct device + struct i2c_client *client = to_i2c_client(dev); + struct adp5520_chip *chip = dev_get_drvdata(&client->dev); + +- adp5520_clr_bits(chip->dev, ADP5520_MODE_STATUS, ADP5520_nSTNBY); ++ adp5520_read(chip->dev, ADP5520_MODE_STATUS, &chip->mode); ++ /* All other bits are W1C */ ++ chip->mode &= ADP5520_BL_EN | ADP5520_DIM_EN | ADP5520_nSTNBY; ++ adp5520_write(chip->dev, ADP5520_MODE_STATUS, 0); + return 0; + } + +@@ -335,7 +339,7 @@ static int adp5520_resume(struct device + struct i2c_client *client = to_i2c_client(dev); + struct adp5520_chip *chip = dev_get_drvdata(&client->dev); + +- adp5520_set_bits(chip->dev, ADP5520_MODE_STATUS, ADP5520_nSTNBY); ++ adp5520_write(chip->dev, ADP5520_MODE_STATUS, chip->mode); + return 0; + } + #endif diff --git a/queue-3.0/mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch b/queue-3.0/mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch new file mode 100644 index 00000000000..ad78a040fd4 --- /dev/null +++ b/queue-3.0/mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch @@ -0,0 +1,42 @@ +From 836dc2fe89c968c10cada87e0dfae6626f8f9da3 Mon Sep 17 00:00:00 2001 +From: Philip Rakity +Date: Thu, 4 Apr 2013 20:18:11 +0100 +Subject: mmc: core: Fix bit width test failing on old eMMC cards + +From: Philip Rakity + +commit 836dc2fe89c968c10cada87e0dfae6626f8f9da3 upstream. + +PARTITION_SUPPORT needs to be set before doing the compare on version +number so the bit width test does not get invalid data. Before this +patch, a Sandisk iNAND eMMC card would detect 1-bit width although +the hardware supports 4-bit. + +Only affects old emmc devices - pre 4.4 devices. + +Reported-by: Elad Yi +Signed-off-by: Philip Rakity +Signed-off-by: Chris Ball +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/core/mmc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/mmc/core/mmc.c ++++ b/drivers/mmc/core/mmc.c +@@ -353,13 +353,13 @@ static int mmc_read_ext_csd(struct mmc_c + ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT]; + card->ext_csd.raw_trim_mult = + ext_csd[EXT_CSD_TRIM_MULT]; ++ card->ext_csd.raw_partition_support = ext_csd[EXT_CSD_PARTITION_SUPPORT]; + if (card->ext_csd.rev >= 4) { + /* + * Enhanced area feature support -- check whether the eMMC + * card has the Enhanced area enabled. If so, export enhanced + * area offset and size to user by adding sysfs interface. + */ +- card->ext_csd.raw_partition_support = ext_csd[EXT_CSD_PARTITION_SUPPORT]; + if ((ext_csd[EXT_CSD_PARTITION_SUPPORT] & 0x2) && + (ext_csd[EXT_CSD_PARTITION_ATTRIBUTE] & 0x1)) { + u8 hc_erase_grp_sz = diff --git a/queue-3.0/series b/queue-3.0/series index f147444ff14..ef79844eb93 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -39,3 +39,6 @@ nfsd-decode-and-send-64bit-time-values.patch wireless-regulatory-fix-channel-disabling-race-condition.patch ipc-sysv-shared-memory-limited-to-8tib.patch ext4-fix-kconfig-documentation-for-config_ext4_debug.patch +x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch +mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch +mfd-adp5520-restore-mode-bits-on-resume.patch diff --git a/queue-3.0/x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch b/queue-3.0/x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch new file mode 100644 index 00000000000..1d6bade3729 --- /dev/null +++ b/queue-3.0/x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch @@ -0,0 +1,42 @@ +From f7b0e1055574ce06ab53391263b4e205bf38daf3 Mon Sep 17 00:00:00 2001 +From: Li Fei +Date: Fri, 26 Apr 2013 20:50:11 +0800 +Subject: x86: Eliminate irq_mis_count counted in arch_irq_stat + +From: Li Fei + +commit f7b0e1055574ce06ab53391263b4e205bf38daf3 upstream. + +With the current implementation, kstat_cpu(cpu).irqs_sum is also +increased in case of irq_mis_count increment. + +So there is no need to count irq_mis_count in arch_irq_stat, +otherwise irq_mis_count will be counted twice in the sum of +/proc/stat. + +Reported-by: Liu Chuansheng +Signed-off-by: Li Fei +Acked-by: Liu Chuansheng +Cc: tomoki.sekiyama.qu@hitachi.com +Cc: joe@perches.com +Link: http://lkml.kernel.org/r/1366980611.32469.7.camel@fli24-HP-Compaq-8100-Elite-CMT-PC +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/irq.c | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/arch/x86/kernel/irq.c ++++ b/arch/x86/kernel/irq.c +@@ -159,10 +159,6 @@ u64 arch_irq_stat_cpu(unsigned int cpu) + u64 arch_irq_stat(void) + { + u64 sum = atomic_read(&irq_err_count); +- +-#ifdef CONFIG_X86_IO_APIC +- sum += atomic_read(&irq_mis_count); +-#endif + return sum; + } + -- 2.47.3