--- /dev/null
+From 28889b7e7818342f6c254e27b9b2c68702ab867a Mon Sep 17 00:00:00 2001
+From: Richard Cochran <richardcochran@gmail.com>
+Date: Thu, 20 Sep 2012 19:11:12 +0000
+Subject: gianfar: fix phc index build failure
+
+From: Richard Cochran <richardcochran@gmail.com>
+
+commit 28889b7e7818342f6c254e27b9b2c68702ab867a upstream.
+
+This patch fixes a build failure introduced in commit 66636287
+("gianfar: Support the get_ts_info ethtool method."). Not only was a
+global variable inconsistently named, but also it was not exported as
+it should have been.
+
+This fix is also needed in stable version 3.5.
+
+Signed-off-by: Richard Cochran <richardcochran@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
++++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
+@@ -1773,6 +1773,7 @@ static int gfar_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
+ }
+
+ int gfar_phc_index = -1;
++EXPORT_SYMBOL(gfar_phc_index);
+
+ static int gfar_get_ts_info(struct net_device *dev,
+ struct ethtool_ts_info *info)
+diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c b/drivers/net/ethernet/freescale/gianfar_ptp.c
+index c08e5d4..0daa66b 100644
+--- a/drivers/net/ethernet/freescale/gianfar_ptp.c
++++ b/drivers/net/ethernet/freescale/gianfar_ptp.c
+@@ -515,7 +515,7 @@ static int gianfar_ptp_probe(struct platform_device *dev)
+ err = PTR_ERR(etsects->clock);
+ goto no_clock;
+ }
+- gfar_phc_clock = ptp_clock_index(etsects->clock);
++ gfar_phc_index = ptp_clock_index(etsects->clock);
+
+ dev_set_drvdata(&dev->dev, etsects);
+
+@@ -539,7 +539,7 @@ static int gianfar_ptp_remove(struct platform_device *dev)
+ gfar_write(&etsects->regs->tmr_temask, 0);
+ gfar_write(&etsects->regs->tmr_ctrl, 0);
+
+- gfar_phc_clock = -1;
++ gfar_phc_index = -1;
+ ptp_clock_unregister(etsects->clock);
+ iounmap(etsects->regs);
+ release_resource(etsects->rsrc);
--- /dev/null
+From 6dafab6b1383e912cd252fa809570b484eb6e0dc Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Wed, 19 Sep 2012 12:54:22 +1000
+Subject: md: make sure metadata is updated when spares are activated or removed.
+
+From: NeilBrown <neilb@suse.de>
+
+commit 6dafab6b1383e912cd252fa809570b484eb6e0dc upstream.
+
+It isn't always necessary to update the metadata when spares are
+removed as the presence-or-not of a spare isn't really important to
+the integrity of an array.
+Also activating a spare doesn't always require updating the metadata
+as the update on 'recovery-completed' is usually sufficient.
+
+However the introduction of 'replacement' devices have made these
+transitions sometimes more important. For example the 'Replacement'
+flag isn't cleared until the original device is removed, so we need
+to ensure a metadata update after that 'spare' is removed.
+
+So set MD_CHANGE_DEVS whenever a spare is activated or removed, to
+complement the current situation where it is set when a spare is added
+or a device is failed (or a number of other less common situations).
+
+This is suitable for -stable as out-of-data metadata could lead
+to data corruption.
+This is only relevant for 3.3 and later 9when 'replacement' as
+introduced.
+
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/md.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -7096,6 +7096,7 @@ static int remove_and_add_spares(mddev_t
+ {
+ mdk_rdev_t *rdev;
+ int spares = 0;
++ int removed = 0;
+
+ mddev->curr_resync_completed = 0;
+
+@@ -7111,6 +7112,7 @@ static int remove_and_add_spares(mddev_t
+ sprintf(nm,"rd%d", rdev->raid_disk);
+ sysfs_remove_link(&mddev->kobj, nm);
+ rdev->raid_disk = -1;
++ removed = 1;
+ }
+ }
+
+@@ -7139,6 +7141,8 @@ static int remove_and_add_spares(mddev_t
+ }
+ }
+ }
++ if (removed)
++ set_bit(MD_CHANGE_DEVS, &mddev->flags);
+ return spares;
+ }
+
+@@ -7152,9 +7156,11 @@ static void reap_sync_thread(mddev_t *md
+ !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) {
+ /* success...*/
+ /* activate any spares */
+- if (mddev->pers->spare_active(mddev))
++ if (mddev->pers->spare_active(mddev)) {
+ sysfs_notify(&mddev->kobj, NULL,
+ "degraded");
++ set_bit(MD_CHANGE_DEVS, &mddev->flags);
++ }
+ }
+ if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery) &&
+ mddev->pers->finish_reshape)
asus-laptop-hrws-hwrs-typo.patch
asus-nb-wmi-add-some-video-toggle-keys.patch
drm-i915-hdmi-clear-audio-enable-bit-for-hot-plug.patch
+md-make-sure-metadata-is-updated-when-spares-are-activated-or-removed.patch
+workqueue-unbound-rebind-morphing-in-rebind_workers-should-be-atomic.patch
+x86-fix-boot-on-twinhead-h12y.patch
+gianfar-fix-phc-index-build-failure.patch
--- /dev/null
+From 96e65306b81351b656835c15931d1d237b252f27 Mon Sep 17 00:00:00 2001
+From: Lai Jiangshan <laijs@cn.fujitsu.com>
+Date: Sun, 2 Sep 2012 00:28:19 +0800
+Subject: workqueue: UNBOUND -> REBIND morphing in rebind_workers() should be atomic
+
+From: Lai Jiangshan <laijs@cn.fujitsu.com>
+
+commit 96e65306b81351b656835c15931d1d237b252f27 upstream.
+
+The compiler may compile the following code into TWO write/modify
+instructions.
+
+ worker->flags &= ~WORKER_UNBOUND;
+ worker->flags |= WORKER_REBIND;
+
+so the other CPU may temporarily see worker->flags which doesn't have
+either WORKER_UNBOUND or WORKER_REBIND set and perform local wakeup
+prematurely.
+
+Fix it by using single explicit assignment via ACCESS_ONCE().
+
+Because idle workers have another WORKER_NOT_RUNNING flag, this bug
+doesn't exist for them; however, update it to use the same pattern for
+consistency.
+
+tj: Applied the change to idle workers too and updated comments and
+ patch description a bit.
+
+Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/workqueue.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/kernel/workqueue.c
++++ b/kernel/workqueue.c
+@@ -3412,14 +3412,17 @@ static int __cpuinit trustee_thread(void
+
+ for_each_busy_worker(worker, i, pos, gcwq) {
+ struct work_struct *rebind_work = &worker->rebind_work;
++ unsigned long worker_flags = worker->flags;
+
+ /*
+ * Rebind_work may race with future cpu hotplug
+ * operations. Use a separate flag to mark that
+- * rebinding is scheduled.
++ * rebinding is scheduled. The morphing should
++ * be atomic.
+ */
+- worker->flags |= WORKER_REBIND;
+- worker->flags &= ~WORKER_ROGUE;
++ worker_flags |= WORKER_REBIND;
++ worker_flags &= ~WORKER_ROGUE;
++ ACCESS_ONCE(worker->flags) = worker_flags;
+
+ /* queue rebind_work, wq doesn't matter, use the default one */
+ if (test_and_set_bit(WORK_STRUCT_PENDING_BIT,
--- /dev/null
+From 80b3e557371205566a71e569fbfcce5b11f92dbe Mon Sep 17 00:00:00 2001
+From: Alan Cox <alan@linux.intel.com>
+Date: Tue, 15 May 2012 18:44:15 +0100
+Subject: x86: Fix boot on Twinhead H12Y
+
+From: Alan Cox <alan@linux.intel.com>
+
+commit 80b3e557371205566a71e569fbfcce5b11f92dbe upstream.
+
+Despite lots of investigation into why this is needed we don't
+know or have an elegant cure. The only answer found on this
+laptop is to mark a problem region as used so that Linux doesn't
+put anything there.
+
+Currently all the users add reserve= command lines and anyone
+not knowing this needs to find the magic page that documents it.
+Automate it instead.
+
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Tested-and-bugfixed-by: Arne Fitzenreiter <arne@fitzenreiter.de>
+Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=10231
+Link: http://lkml.kernel.org/r/20120515174347.5109.94551.stgit@bluebook
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/pci/fixup.c | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+--- a/arch/x86/pci/fixup.c
++++ b/arch/x86/pci/fixup.c
+@@ -521,3 +521,20 @@ static void sb600_disable_hpet_bar(struc
+ }
+ }
+ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATI, 0x4385, sb600_disable_hpet_bar);
++
++/*
++ * Twinhead H12Y needs us to block out a region otherwise we map devices
++ * there and any access kills the box.
++ *
++ * See: https://bugzilla.kernel.org/show_bug.cgi?id=10231
++ *
++ * Match off the LPC and svid/sdid (older kernels lose the bridge subvendor)
++ */
++static void __devinit twinhead_reserve_killing_zone(struct pci_dev *dev)
++{
++ if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device == 0xA003) {
++ pr_info("Reserving memory on Twinhead H12Y\n");
++ request_mem_region(0xFFB00000, 0x100000, "twinhead");
++ }
++}
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x27B9, twinhead_reserve_killing_zone);