]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.3-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2012 17:37:02 +0000 (10:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2012 17:37:02 +0000 (10:37 -0700)
added patches:
pci-add-quirk-for-still-enabled-interrupts-on-intel-sandy-bridge-gpus.patch
usb-gadget-eliminate-null-pointer-dereference-bugfix.patch
usb-gadget-udc-core-fix-asymmetric-calls-in-remove_driver.patch
usb-gadget-udc-core-stop-udc-on-device-initiated-disconnect.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

queue-3.3/pci-add-quirk-for-still-enabled-interrupts-on-intel-sandy-bridge-gpus.patch [new file with mode: 0644]
queue-3.3/series
queue-3.3/usb-gadget-eliminate-null-pointer-dereference-bugfix.patch [new file with mode: 0644]
queue-3.3/usb-gadget-udc-core-fix-asymmetric-calls-in-remove_driver.patch [new file with mode: 0644]
queue-3.3/usb-gadget-udc-core-stop-udc-on-device-initiated-disconnect.patch [new file with mode: 0644]
queue-3.3/usb-musb-omap-fix-crash-when-musb-glue-omap-gets-initialized.patch [new file with mode: 0644]
queue-3.3/usb-musb-omap-fix-the-error-check-for-pm_runtime_get_sync.patch [new file with mode: 0644]

diff --git a/queue-3.3/pci-add-quirk-for-still-enabled-interrupts-on-intel-sandy-bridge-gpus.patch b/queue-3.3/pci-add-quirk-for-still-enabled-interrupts-on-intel-sandy-bridge-gpus.patch
new file mode 100644 (file)
index 0000000..b2a32e4
--- /dev/null
@@ -0,0 +1,85 @@
+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
+@@ -2906,6 +2906,40 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
++/*
++ * 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)
+ {
index 0b4e01af79b6825748111871da58679789a96d8a..25675e250e31dd45f91e435331f7d75e95725e5a 100644 (file)
@@ -39,3 +39,9 @@ usb-sierra-avoid-qmi-wwan-interface-on-mc77xx.patch
 ehci-fix-criterion-for-resuming-the-root-hub.patch
 ehci-always-clear-the-sts_flr-status-bit.patch
 usb-fix-deadlock-in-bconfigurationvalue-attribute-method.patch
+usb-gadget-udc-core-stop-udc-on-device-initiated-disconnect.patch
+usb-gadget-udc-core-fix-asymmetric-calls-in-remove_driver.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
diff --git a/queue-3.3/usb-gadget-eliminate-null-pointer-dereference-bugfix.patch b/queue-3.3/usb-gadget-eliminate-null-pointer-dereference-bugfix.patch
new file mode 100644 (file)
index 0000000..0c977fa
--- /dev/null
@@ -0,0 +1,53 @@
+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
+@@ -712,7 +712,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;
diff --git a/queue-3.3/usb-gadget-udc-core-fix-asymmetric-calls-in-remove_driver.patch b/queue-3.3/usb-gadget-udc-core-fix-asymmetric-calls-in-remove_driver.patch
new file mode 100644 (file)
index 0000000..862abb0
--- /dev/null
@@ -0,0 +1,42 @@
+From 8ae8090c82eb407267001f75b3d256b3bd4ae691 Mon Sep 17 00:00:00 2001
+From: Kishon Vijay Abraham I <kishon@ti.com>
+Date: Wed, 21 Mar 2012 21:34:30 +0530
+Subject: usb: gadget: udc-core: fix asymmetric calls in remove_driver
+
+From: Kishon Vijay Abraham I <kishon@ti.com>
+
+commit 8ae8090c82eb407267001f75b3d256b3bd4ae691 upstream.
+
+During modprobe of gadget driver, pullup is called after
+udc_start. In order to make the exit path symmetric when
+removing a gadget driver, call pullup before ->udc_stop.
+
+This is needed to avoid issues with PM where udc_stop
+disables the module completely (put IP in reset state,
+cut functional and interface clocks, and so on), which
+prevents us from accessing the IP's address space,
+thus creating the possibility of an abort exception
+when we try to access IP's address space after clocks
+are off.
+
+Signed-off-by: Partha Basak <p-basak2@ti.com>
+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/gadget/udc-core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/udc-core.c
++++ b/drivers/usb/gadget/udc-core.c
+@@ -212,8 +212,8 @@ static void usb_gadget_remove_driver(str
+       if (udc_is_newstyle(udc)) {
+               udc->driver->disconnect(udc->gadget);
+               udc->driver->unbind(udc->gadget);
+-              usb_gadget_udc_stop(udc->gadget, udc->driver);
+               usb_gadget_disconnect(udc->gadget);
++              usb_gadget_udc_stop(udc->gadget, udc->driver);
+       } else {
+               usb_gadget_stop(udc->gadget, udc->driver);
+       }
diff --git a/queue-3.3/usb-gadget-udc-core-stop-udc-on-device-initiated-disconnect.patch b/queue-3.3/usb-gadget-udc-core-stop-udc-on-device-initiated-disconnect.patch
new file mode 100644 (file)
index 0000000..f2ce8d6
--- /dev/null
@@ -0,0 +1,40 @@
+From 6d258a4c42089229b855fd706622029decf316d6 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Thu, 15 Mar 2012 16:37:18 +0200
+Subject: usb: gadget: udc-core: stop UDC on device-initiated disconnect
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit 6d258a4c42089229b855fd706622029decf316d6 upstream.
+
+When we want to do device-initiated disconnect,
+let's make sure we stop the UDC in order to
+e.g. allow lower power states to be achieved by
+turning off unnecessary clocks and/or stoping
+PHYs.
+
+When reconnecting, call ->udc_start() again to
+make sure UDC is reinitialized.
+
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/udc-core.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/gadget/udc-core.c
++++ b/drivers/usb/gadget/udc-core.c
+@@ -359,8 +359,12 @@ static ssize_t usb_udc_softconn_store(st
+       struct usb_udc          *udc = container_of(dev, struct usb_udc, dev);
+       if (sysfs_streq(buf, "connect")) {
++              if (udc_is_newstyle(udc))
++                      usb_gadget_udc_start(udc->gadget, udc->driver);
+               usb_gadget_connect(udc->gadget);
+       } else if (sysfs_streq(buf, "disconnect")) {
++              if (udc_is_newstyle(udc))
++                      usb_gadget_udc_stop(udc->gadget, udc->driver);
+               usb_gadget_disconnect(udc->gadget);
+       } else {
+               dev_err(dev, "unsupported command '%s'\n", buf);
diff --git a/queue-3.3/usb-musb-omap-fix-crash-when-musb-glue-omap-gets-initialized.patch b/queue-3.3/usb-musb-omap-fix-crash-when-musb-glue-omap-gets-initialized.patch
new file mode 100644 (file)
index 0000000..e3e3f13
--- /dev/null
@@ -0,0 +1,41 @@
+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
+@@ -451,14 +451,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:
diff --git a/queue-3.3/usb-musb-omap-fix-the-error-check-for-pm_runtime_get_sync.patch b/queue-3.3/usb-musb-omap-fix-the-error-check-for-pm_runtime_get_sync.patch
new file mode 100644 (file)
index 0000000..31bf2e2
--- /dev/null
@@ -0,0 +1,45 @@
+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
+@@ -281,7 +281,8 @@ static void musb_otg_notifier_work(struc
+ 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;
+@@ -300,7 +301,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;
+       }