--- /dev/null
+From be3128b107e36271f7973ef213ccde603a494fe8 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Thu, 6 Oct 2011 15:01:55 -0500
+Subject: acer-wmi: Add wireless quirk for Lenovo 3000 N200
+
+From: Seth Forshee <seth.forshee@canonical.com>
+
+commit be3128b107e36271f7973ef213ccde603a494fe8 upstream.
+
+This quirk fixes the wlan rfkill status on this machine. Without
+it, wlan is permanently soft blocked whenever acer-wmi is loaded.
+
+BugLink: https://bugs.launchpad.net/bugs/857297
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+Reviewed-by: Lee, Chun-Yi <jlee@novell.com>
+Signed-off-by: Matthew Garrett <mjg@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/platform/x86/acer-wmi.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/platform/x86/acer-wmi.c
++++ b/drivers/platform/x86/acer-wmi.c
+@@ -463,6 +463,15 @@ static struct dmi_system_id acer_quirks[
+ },
+ .driver_data = &quirk_lenovo_ideapad_s205,
+ },
++ {
++ .callback = dmi_matched,
++ .ident = "Lenovo 3000 N200",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "0687A31"),
++ },
++ .driver_data = &quirk_fujitsu_amilo_li_1718,
++ },
+ {}
+ };
+
--- /dev/null
+From 1709adab0773616da7a8190f2762e599afb0a295 Mon Sep 17 00:00:00 2001
+From: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>
+Date: Thu, 18 Aug 2011 18:47:33 +0800
+Subject: acer-wmi: check wireless capability flag before register rfkill
+
+From: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>
+
+commit 1709adab0773616da7a8190f2762e599afb0a295 upstream.
+
+There will be better to check the wireless capability flag
+(ACER_CAP_WIRELESS) before register wireless rfkill because maybe
+the machine doesn't have wifi module or the module removed by user.
+
+Tested on Acer Travelmate 8572
+Tested on Acer Aspire 4739Z
+
+Tested-by: AceLan Kao <acelan.kao@canonical.com>
+Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
+Cc: Matthew Garrett <mjg@redhat.com>
+Cc: Dmitry Torokhov <dtor@mail.ru>
+Cc: Corentin Chary <corentincj@iksaif.net>
+Cc: Thomas Renninger <trenn@suse.de>
+Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
+Signed-off-by: Matthew Garrett <mjg@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/platform/x86/acer-wmi.c | 64 ++++++++++++++++++++++++++--------------
+ 1 file changed, 42 insertions(+), 22 deletions(-)
+
+--- a/drivers/platform/x86/acer-wmi.c
++++ b/drivers/platform/x86/acer-wmi.c
+@@ -1293,12 +1293,13 @@ static void acer_rfkill_update(struct wo
+ u32 state;
+ acpi_status status;
+
+- status = get_u32(&state, ACER_CAP_WIRELESS);
+- if (ACPI_SUCCESS(status)) {
+- if (quirks->wireless == 3) {
+- rfkill_set_hw_state(wireless_rfkill, !state);
+- } else {
+- rfkill_set_sw_state(wireless_rfkill, !state);
++ if (has_cap(ACER_CAP_WIRELESS)) {
++ status = get_u32(&state, ACER_CAP_WIRELESS);
++ if (ACPI_SUCCESS(status)) {
++ if (quirks->wireless == 3)
++ rfkill_set_hw_state(wireless_rfkill, !state);
++ else
++ rfkill_set_sw_state(wireless_rfkill, !state);
+ }
+ }
+
+@@ -1367,19 +1368,24 @@ static struct rfkill *acer_rfkill_regist
+
+ static int acer_rfkill_init(struct device *dev)
+ {
+- wireless_rfkill = acer_rfkill_register(dev, RFKILL_TYPE_WLAN,
+- "acer-wireless", ACER_CAP_WIRELESS);
+- if (IS_ERR(wireless_rfkill))
+- return PTR_ERR(wireless_rfkill);
++ int err;
++
++ if (has_cap(ACER_CAP_WIRELESS)) {
++ wireless_rfkill = acer_rfkill_register(dev, RFKILL_TYPE_WLAN,
++ "acer-wireless", ACER_CAP_WIRELESS);
++ if (IS_ERR(wireless_rfkill)) {
++ err = PTR_ERR(wireless_rfkill);
++ goto error_wireless;
++ }
++ }
+
+ if (has_cap(ACER_CAP_BLUETOOTH)) {
+ bluetooth_rfkill = acer_rfkill_register(dev,
+ RFKILL_TYPE_BLUETOOTH, "acer-bluetooth",
+ ACER_CAP_BLUETOOTH);
+ if (IS_ERR(bluetooth_rfkill)) {
+- rfkill_unregister(wireless_rfkill);
+- rfkill_destroy(wireless_rfkill);
+- return PTR_ERR(bluetooth_rfkill);
++ err = PTR_ERR(bluetooth_rfkill);
++ goto error_bluetooth;
+ }
+ }
+
+@@ -1388,30 +1394,44 @@ static int acer_rfkill_init(struct devic
+ RFKILL_TYPE_WWAN, "acer-threeg",
+ ACER_CAP_THREEG);
+ if (IS_ERR(threeg_rfkill)) {
+- rfkill_unregister(wireless_rfkill);
+- rfkill_destroy(wireless_rfkill);
+- rfkill_unregister(bluetooth_rfkill);
+- rfkill_destroy(bluetooth_rfkill);
+- return PTR_ERR(threeg_rfkill);
++ err = PTR_ERR(threeg_rfkill);
++ goto error_threeg;
+ }
+ }
+
+ rfkill_inited = true;
+
+- if (ec_raw_mode || !wmi_has_guid(ACERWMID_EVENT_GUID))
++ if ((ec_raw_mode || !wmi_has_guid(ACERWMID_EVENT_GUID)) &&
++ has_cap(ACER_CAP_WIRELESS | ACER_CAP_BLUETOOTH | ACER_CAP_THREEG))
+ schedule_delayed_work(&acer_rfkill_work,
+ round_jiffies_relative(HZ));
+
+ return 0;
++
++error_threeg:
++ if (has_cap(ACER_CAP_BLUETOOTH)) {
++ rfkill_unregister(bluetooth_rfkill);
++ rfkill_destroy(bluetooth_rfkill);
++ }
++error_bluetooth:
++ if (has_cap(ACER_CAP_WIRELESS)) {
++ rfkill_unregister(wireless_rfkill);
++ rfkill_destroy(wireless_rfkill);
++ }
++error_wireless:
++ return err;
+ }
+
+ static void acer_rfkill_exit(void)
+ {
+- if (ec_raw_mode || !wmi_has_guid(ACERWMID_EVENT_GUID))
++ if ((ec_raw_mode || !wmi_has_guid(ACERWMID_EVENT_GUID)) &&
++ has_cap(ACER_CAP_WIRELESS | ACER_CAP_BLUETOOTH | ACER_CAP_THREEG))
+ cancel_delayed_work_sync(&acer_rfkill_work);
+
+- rfkill_unregister(wireless_rfkill);
+- rfkill_destroy(wireless_rfkill);
++ if (has_cap(ACER_CAP_WIRELESS)) {
++ rfkill_unregister(wireless_rfkill);
++ rfkill_destroy(wireless_rfkill);
++ }
+
+ if (has_cap(ACER_CAP_BLUETOOTH)) {
+ rfkill_unregister(bluetooth_rfkill);
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
-@@ -648,6 +648,32 @@ static acpi_status AMW0_find_mailled(voi
+@@ -676,6 +676,32 @@ static acpi_status AMW0_find_mailled(voi
return AE_OK;
}
static acpi_status AMW0_set_capabilities(void)
{
struct wmab_args args;
-@@ -661,7 +687,9 @@ static acpi_status AMW0_set_capabilities
+@@ -689,7 +715,9 @@ static acpi_status AMW0_set_capabilities
* work.
*/
if (wmi_has_guid(AMW0_GUID2)) {
--- /dev/null
+From 15b956a0b5651bbb1217ec374fdd67291dabb2af Mon Sep 17 00:00:00 2001
+From: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>
+Date: Sat, 30 Jul 2011 17:00:45 +0800
+Subject: acer-wmi: support Lenovo ideapad S205 wifi switch
+
+From: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>
+
+commit 15b956a0b5651bbb1217ec374fdd67291dabb2af upstream.
+
+The AMW0 function in acer-wmi works on Lenovo ideapad S205 for control
+the wifi hardware state. We also found there have a 0x78 EC register
+exposes the state of wifi hardware switch on the machine.
+
+So, add this patch to support Lenovo ideapad S205 wifi hardware switch
+in acer-wmi driver.
+
+Reference: bko#37892
+ https://bugzilla.kernel.org/show_bug.cgi?id=37892
+
+Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
+Cc: Matthew Garrett <mjg@redhat.com>
+Cc: Dmitry Torokhov <dtor@mail.ru>
+Cc: Corentin Chary <corentincj@iksaif.net>
+Cc: Thomas Renninger <trenn@suse.de>
+Tested-by: Florian Heyer <heyho@flanto.de>
+Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
+Signed-off-by: Matthew Garrett <mjg@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/platform/x86/acer-wmi.c | 28 ++++++++++++++++++++++++++--
+ 1 file changed, 26 insertions(+), 2 deletions(-)
+
+--- a/drivers/platform/x86/acer-wmi.c
++++ b/drivers/platform/x86/acer-wmi.c
+@@ -304,6 +304,10 @@ static struct quirk_entry quirk_fujitsu_
+ .wireless = 2,
+ };
+
++static struct quirk_entry quirk_lenovo_ideapad_s205 = {
++ .wireless = 3,
++};
++
+ /* The Aspire One has a dummy ACPI-WMI interface - disable it */
+ static struct dmi_system_id __devinitdata acer_blacklist[] = {
+ {
+@@ -450,6 +454,15 @@ static struct dmi_system_id acer_quirks[
+ },
+ .driver_data = &quirk_medion_md_98300,
+ },
++ {
++ .callback = dmi_matched,
++ .ident = "Lenovo Ideapad S205",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "10382LG"),
++ },
++ .driver_data = &quirk_lenovo_ideapad_s205,
++ },
+ {}
+ };
+
+@@ -542,6 +555,12 @@ struct wmi_interface *iface)
+ return AE_ERROR;
+ *value = result & 0x1;
+ return AE_OK;
++ case 3:
++ err = ec_read(0x78, &result);
++ if (err)
++ return AE_ERROR;
++ *value = result & 0x1;
++ return AE_OK;
+ default:
+ err = ec_read(0xA, &result);
+ if (err)
+@@ -1266,8 +1285,13 @@ static void acer_rfkill_update(struct wo
+ acpi_status status;
+
+ status = get_u32(&state, ACER_CAP_WIRELESS);
+- if (ACPI_SUCCESS(status))
+- rfkill_set_sw_state(wireless_rfkill, !state);
++ if (ACPI_SUCCESS(status)) {
++ if (quirks->wireless == 3) {
++ rfkill_set_hw_state(wireless_rfkill, !state);
++ } else {
++ rfkill_set_sw_state(wireless_rfkill, !state);
++ }
++ }
+
+ if (has_cap(ACER_CAP_BLUETOOTH)) {
+ status = get_u32(&state, ACER_CAP_BLUETOOTH);
--- /dev/null
+From: Jiri Slaby <jslaby@suse.cz>
+Date: Mon, 5 Mar 2012 14:06:38 +0100
+Subject: compat: Re-add missing asm/compat.h include to fix compile breakage on s390
+
+From: Jiri Slaby <jslaby@suse.cz>
+
+For 3.0 stable kernel the backport of 048cd4e51d24ebf7f3552226d03c769d6ad91658
+"compat: fix compile breakage on s390" breaks compilation...
+
+Re-add a single #include <asm/compat.h> in order to fix this.
+
+This patch is _not_ necessary for upstream, only for stable kernels
+which include the "build fix" mentioned above.
+
+One fix for arch/s390/kernel/setup.c was already sent and applied. But
+we need a similar patch for drivers/s390/char/fs3270.c.
+
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/s390/char/fs3270.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/s390/char/fs3270.c
++++ b/drivers/s390/char/fs3270.c
+@@ -16,6 +16,7 @@
+ #include <linux/types.h>
+ #include <linux/compat.h>
+
++#include <asm/compat.h>
+ #include <asm/ccwdev.h>
+ #include <asm/cio.h>
+ #include <asm/ebcdic.h>
--- /dev/null
+From 32260d94408c553dca4ce54104edf79941a27536 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Mon, 12 Mar 2012 08:33:10 -0700
+Subject: hwmon: (w83627ehf) Fix memory leak in probe function
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit 32260d94408c553dca4ce54104edf79941a27536 upstream.
+
+The driver probe function leaked memory if creating the cpu0_vid attribute file
+failed. Fix by converting the driver to use devm_kzalloc.
+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/w83627ehf.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+--- a/drivers/hwmon/w83627ehf.c
++++ b/drivers/hwmon/w83627ehf.c
+@@ -1823,7 +1823,8 @@ static int __devinit w83627ehf_probe(str
+ goto exit;
+ }
+
+- data = kzalloc(sizeof(struct w83627ehf_data), GFP_KERNEL);
++ data = devm_kzalloc(&pdev->dev, sizeof(struct w83627ehf_data),
++ GFP_KERNEL);
+ if (!data) {
+ err = -ENOMEM;
+ goto exit_release;
+@@ -2319,9 +2320,8 @@ static int __devinit w83627ehf_probe(str
+
+ exit_remove:
+ w83627ehf_device_remove_files(dev);
+- kfree(data);
+- platform_set_drvdata(pdev, NULL);
+ exit_release:
++ platform_set_drvdata(pdev, NULL);
+ release_region(res->start, IOREGION_LENGTH);
+ exit:
+ return err;
+@@ -2335,7 +2335,6 @@ static int __devexit w83627ehf_remove(st
+ w83627ehf_device_remove_files(&pdev->dev);
+ release_region(data->addr, IOREGION_LENGTH);
+ platform_set_drvdata(pdev, NULL);
+- kfree(data);
+
+ return 0;
+ }
--- /dev/null
+From 33fa9b620409edfc71aa6cf01a51f990fbe46ab8 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Mon, 12 Mar 2012 08:21:16 -0700
+Subject: hwmon: (w83627ehf) Fix writing into fan_stop_time for NCT6775F/NCT6776F
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit 33fa9b620409edfc71aa6cf01a51f990fbe46ab8 upstream.
+
+NCT6775F and NCT6776F have their own set of registers for FAN_STOP_TIME. The
+correct registers were used to read FAN_STOP_TIME, but writes used the wrong
+registers. Fix it.
+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/w83627ehf.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hwmon/w83627ehf.c
++++ b/drivers/hwmon/w83627ehf.c
+@@ -1583,7 +1583,7 @@ store_##reg(struct device *dev, struct d
+ val = step_time_to_reg(val, data->pwm_mode[nr]); \
+ mutex_lock(&data->update_lock); \
+ data->reg[nr] = val; \
+- w83627ehf_write_value(data, W83627EHF_REG_##REG[nr], val); \
++ w83627ehf_write_value(data, data->REG_##REG[nr], val); \
+ mutex_unlock(&data->update_lock); \
+ return count; \
+ } \
--- /dev/null
+From 8ee161ce5e0cfc689eb677f227a6248191165fac Mon Sep 17 00:00:00 2001
+From: Ville Syrjala <syrjala@sci.fi>
+Date: Thu, 15 Mar 2012 18:11:05 +0100
+Subject: i2c-algo-bit: Fix spurious SCL timeouts under heavy load
+
+From: Ville Syrjala <syrjala@sci.fi>
+
+commit 8ee161ce5e0cfc689eb677f227a6248191165fac upstream.
+
+When the system is under heavy load, there can be a significant delay
+between the getscl() and time_after() calls inside sclhi(). That delay
+may cause the time_after() check to trigger after SCL has gone high,
+causing sclhi() to return -ETIMEDOUT.
+
+To fix the problem, double check that SCL is still low after the
+timeout has been reached, before deciding to return -ETIMEDOUT.
+
+Signed-off-by: Ville Syrjala <syrjala@sci.fi>
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/i2c/algos/i2c-algo-bit.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/i2c/algos/i2c-algo-bit.c
++++ b/drivers/i2c/algos/i2c-algo-bit.c
+@@ -103,8 +103,14 @@ static int sclhi(struct i2c_algo_bit_dat
+ * chips may hold it low ("clock stretching") while they
+ * are processing data internally.
+ */
+- if (time_after(jiffies, start + adap->timeout))
++ if (time_after(jiffies, start + adap->timeout)) {
++ /* Test one last time, as we may have been preempted
++ * between last check and timeout test.
++ */
++ if (getscl(adap))
++ break;
+ return -ETIMEDOUT;
++ }
+ cond_resched();
+ }
+ #ifdef DEBUG
rt2x00-fix-random-stalls.patch
vfs-fix-return-value-from-do_last.patch
vfs-fix-double-put-after-complete_walk.patch
+acer-wmi-support-lenovo-ideapad-s205-wifi-switch.patch
+acer-wmi-add-wireless-quirk-for-lenovo-3000-n200.patch
+acer-wmi-check-wireless-capability-flag-before-register-rfkill.patch
acer-wmi-no-wifi-rfkill-on-lenovo-machines.patch
neighbour-fixed-race-condition-at-tbl-nht.patch
ipsec-be-careful-of-non-existing-mac-headers.patch
block-fix-__blkdev_get-and-add_disk-race-condition.patch
block-use-a-freezable-workqueue-for-disk-event-polling.patch
sfc-fix-assignment-of-ip_summed-for-pre-allocated-skbs.patch
+sparc32-add-av8-to-assembler-command-line.patch
+compat-Re-add-missing-asm-compat.h-include.patch
+hwmon-w83627ehf-fix-writing-into-fan_stop_time-for-nct6775f-nct6776f.patch
+hwmon-w83627ehf-fix-memory-leak-in-probe-function.patch
+i2c-algo-bit-fix-spurious-scl-timeouts-under-heavy-load.patch
--- /dev/null
+From e0adb9902fb338a9fe634c3c2a3e474075c733ba Mon Sep 17 00:00:00 2001
+From: "David S. Miller" <davem@davemloft.net>
+Date: Tue, 13 Mar 2012 18:19:51 -0700
+Subject: sparc32: Add -Av8 to assembler command line.
+
+From: "David S. Miller" <davem@davemloft.net>
+
+commit e0adb9902fb338a9fe634c3c2a3e474075c733ba upstream.
+
+Newer version of binutils are more strict about specifying the
+correct options to enable certain classes of instructions.
+
+The sparc32 build is done for v7 in order to support sun4c systems
+which lack hardware integer multiply and divide instructions.
+
+So we have to pass -Av8 when building the assembler routines that
+use these instructions and get patched into the kernel when we find
+out that we have a v8 capable cpu.
+
+Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/sparc/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/sparc/Makefile
++++ b/arch/sparc/Makefile
+@@ -31,7 +31,7 @@ UTS_MACHINE := sparc
+
+ #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
+ KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
+-KBUILD_AFLAGS += -m32
++KBUILD_AFLAGS += -m32 -Wa,-Av8
+
+ #LDFLAGS_vmlinux = -N -Ttext 0xf0004000
+ # Since 2.5.40, the first stage is left not btfix-ed.