--- /dev/null
+From f67fd55fa96f7d7295b43ffbc4a97d8f55e473aa Mon Sep 17 00:00:00 2001
+From: Thomas Jarosch <thomas.jarosch@intra2net.com>
+Date: Wed, 7 Dec 2011 22:08:11 +0100
+Subject: PCI: Add quirk for still enabled interrupts on Intel Sandy Bridge GPUs
+
+From: Thomas Jarosch <thomas.jarosch@intra2net.com>
+
+commit f67fd55fa96f7d7295b43ffbc4a97d8f55e473aa upstream.
+
+Some BIOS implementations leave the Intel GPU interrupts enabled,
+even though no one is handling them (f.e. i915 driver is never loaded).
+Additionally the interrupt destination is not set up properly
+and the interrupt ends up -somewhere-.
+
+These spurious interrupts are "sticky" and the kernel disables
+the (shared) interrupt line after 100.000+ generated interrupts.
+
+Fix it by disabling the still enabled interrupts.
+This resolves crashes often seen on monitor unplug.
+
+Tested on the following boards:
+- Intel DH61CR: Affected
+- Intel DH67BL: Affected
+- Intel S1200KP server board: Affected
+- Asus P8H61-M LE: Affected, but system does not crash.
+ Probably the IRQ ends up somewhere unnoticed.
+
+According to reports on the net, the Intel DH61WW board is also affected.
+
+Many thanks to Jesse Barnes from Intel for helping
+with the register configuration and to Intel in general
+for providing public hardware documentation.
+
+Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
+Tested-by: Charlie Suffin <charlie.suffin@stratus.com>
+Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pci/quirks.c | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+--- a/drivers/pci/quirks.c
++++ b/drivers/pci/quirks.c
+@@ -2822,6 +2822,40 @@ static void __devinit fixup_ti816x_class
+ }
+ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_TI, 0xb800, fixup_ti816x_class);
+
++/*
++ * Some BIOS implementations leave the Intel GPU interrupts enabled,
++ * even though no one is handling them (f.e. i915 driver is never loaded).
++ * Additionally the interrupt destination is not set up properly
++ * and the interrupt ends up -somewhere-.
++ *
++ * These spurious interrupts are "sticky" and the kernel disables
++ * the (shared) interrupt line after 100.000+ generated interrupts.
++ *
++ * Fix it by disabling the still enabled interrupts.
++ * This resolves crashes often seen on monitor unplug.
++ */
++#define I915_DEIER_REG 0x4400c
++static void __devinit disable_igfx_irq(struct pci_dev *dev)
++{
++ void __iomem *regs = pci_iomap(dev, 0, 0);
++ if (regs == NULL) {
++ dev_warn(&dev->dev, "igfx quirk: Can't iomap PCI device\n");
++ return;
++ }
++
++ /* Check if any interrupt line is still enabled */
++ if (readl(regs + I915_DEIER_REG) != 0) {
++ dev_warn(&dev->dev, "BIOS left Intel GPU interrupts enabled; "
++ "disabling\n");
++
++ writel(0, regs + I915_DEIER_REG);
++ }
++
++ pci_iounmap(dev, regs);
++}
++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);
++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
++
+ static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
+ struct pci_fixup *end)
+ {
usb-sierra-avoid-qmi-wwan-interface-on-mc77xx.patch
ehci-always-clear-the-sts_flr-status-bit.patch
usb-fix-deadlock-in-bconfigurationvalue-attribute-method.patch
+usb-gadget-eliminate-null-pointer-dereference-bugfix.patch
+usb-musb-omap-fix-crash-when-musb-glue-omap-gets-initialized.patch
+usb-musb-omap-fix-the-error-check-for-pm_runtime_get_sync.patch
+pci-add-quirk-for-still-enabled-interrupts-on-intel-sandy-bridge-gpus.patch
--- /dev/null
+From 92b0abf80c5c5f0e0d71d1309688a330fd74731b Mon Sep 17 00:00:00 2001
+From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
+Date: Wed, 28 Mar 2012 09:30:50 +0200
+Subject: usb: gadget: eliminate NULL pointer dereference (bugfix)
+
+From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
+
+commit 92b0abf80c5c5f0e0d71d1309688a330fd74731b upstream.
+
+usb: gadget: eliminate NULL pointer dereference (bugfix)
+
+This patch fixes a bug which causes NULL pointer dereference in
+ffs_ep0_ioctl. The bug happens when the FunctionFS is not bound (either
+has not been bound yet or has been bound and then unbound) and can be
+reproduced with running the following commands:
+
+$ insmod g_ffs.ko
+$ mount -t functionfs func /dev/usbgadget
+$ ./null
+
+where null.c is:
+
+#include <fcntl.h>
+#include <linux/usb/functionfs.h>
+
+int main(void)
+{
+ int fd = open("/dev/usbgadget/ep0", O_RDWR);
+ ioctl(fd, FUNCTIONFS_CLEAR_HALT);
+
+ return 0;
+}
+
+Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
+Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/f_fs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/f_fs.c
++++ b/drivers/usb/gadget/f_fs.c
+@@ -720,7 +720,7 @@ static long ffs_ep0_ioctl(struct file *f
+ if (code == FUNCTIONFS_INTERFACE_REVMAP) {
+ struct ffs_function *func = ffs->func;
+ ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV;
+- } else if (gadget->ops->ioctl) {
++ } else if (gadget && gadget->ops->ioctl) {
+ ret = gadget->ops->ioctl(gadget, code, value);
+ } else {
+ ret = -ENOTTY;
--- /dev/null
+From 3006dc8c627d738693e910c159630e4368c9e86c Mon Sep 17 00:00:00 2001
+From: Kishon Vijay Abraham I <kishon@ti.com>
+Date: Wed, 21 Mar 2012 21:30:20 +0530
+Subject: usb: musb: omap: fix crash when musb glue (omap) gets initialized
+
+From: Kishon Vijay Abraham I <kishon@ti.com>
+
+commit 3006dc8c627d738693e910c159630e4368c9e86c upstream.
+
+pm_runtime_enable is being called after omap2430_musb_init. Hence
+pm_runtime_get_sync in omap2430_musb_init does not have any effect (does
+not enable clocks) resulting in a crash during register access. It is
+fixed here.
+
+Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/musb/omap2430.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/musb/omap2430.c
++++ b/drivers/usb/musb/omap2430.c
+@@ -464,14 +464,14 @@ static int __init omap2430_probe(struct
+ goto err2;
+ }
+
++ pm_runtime_enable(&pdev->dev);
++
+ ret = platform_device_add(musb);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to register musb device\n");
+ goto err2;
+ }
+
+- pm_runtime_enable(&pdev->dev);
+-
+ return 0;
+
+ err2:
--- /dev/null
+From ad579699c4f0274bf522a9252ff9b20c72197e48 Mon Sep 17 00:00:00 2001
+From: Shubhrajyoti D <shubhrajyoti@ti.com>
+Date: Thu, 22 Mar 2012 12:48:06 +0530
+Subject: usb: musb: omap: fix the error check for pm_runtime_get_sync
+
+From: Shubhrajyoti D <shubhrajyoti@ti.com>
+
+commit ad579699c4f0274bf522a9252ff9b20c72197e48 upstream.
+
+pm_runtime_get_sync returns a signed integer. In case of errors
+it returns a negative value. This patch fixes the error check
+by making it signed instead of unsigned thus preventing register
+access if get_sync_fails. Also passes the error cause to the
+debug message.
+
+Cc: Kishon Vijay Abraham I <kishon@ti.com>
+Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/musb/omap2430.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/musb/omap2430.c
++++ b/drivers/usb/musb/omap2430.c
+@@ -295,7 +295,8 @@ static int musb_otg_notifications(struct
+
+ static int omap2430_musb_init(struct musb *musb)
+ {
+- u32 l, status = 0;
++ u32 l;
++ int status = 0;
+ struct device *dev = musb->controller;
+ struct musb_hdrc_platform_data *plat = dev->platform_data;
+ struct omap_musb_board_data *data = plat->board_data;
+@@ -312,7 +313,7 @@ static int omap2430_musb_init(struct mus
+
+ status = pm_runtime_get_sync(dev);
+ if (status < 0) {
+- dev_err(dev, "pm_runtime_get_sync FAILED");
++ dev_err(dev, "pm_runtime_get_sync FAILED %d\n", status);
+ goto err1;
+ }
+