--- /dev/null
+From 8931d9ea78848b073bf299594f148b83abde4a5e Mon Sep 17 00:00:00 2001
+From: Lin Ming <ming.m.lin@intel.com>
+Date: Mon, 28 Nov 2011 09:46:02 +0800
+Subject: ACPICA: Fix to allow region arguments to reference other scopes
+
+From: Lin Ming <ming.m.lin@intel.com>
+
+commit 8931d9ea78848b073bf299594f148b83abde4a5e upstream.
+
+Allow referenced objects to be in a different scope.
+
+http://www.acpica.org/bugzilla/show_bug.cgi?id=937
+http://marc.info/?l=linux-acpi&m=131636632718222&w=2
+
+ACPI Error: [RAMB] Namespace lookup failure, AE_NOT_FOUND (20110112/psargs-359)
+ACPI Exception: AE_NOT_FOUND, Could not execute arguments for [RAMW] (Region) (20110112/nsinit-349)
+
+ Scope (_SB)
+ {
+ Name (RAMB, 0xDF5A1018)
+ OperationRegion (\RAMW, SystemMemory, RAMB, 0x00010000)
+ }
+
+For above ASL code, we need to save scope node(\_SB) to lookup
+the argument node(\_SB.RAMB).
+
+Reported-by: Jim Green <student.northwestern@gmail.com>
+Signed-off-by: Lin Ming <ming.m.lin@intel.com>
+Signed-off-by: Bob Moore <robert.moore@intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Cc: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/acpica/acobject.h | 1 +
+ drivers/acpi/acpica/dsargs.c | 2 +-
+ drivers/acpi/acpica/excreate.c | 6 ++++++
+ 3 files changed, 8 insertions(+), 1 deletion(-)
+
+--- a/drivers/acpi/acpica/acobject.h
++++ b/drivers/acpi/acpica/acobject.h
+@@ -358,6 +358,7 @@ typedef enum {
+ */
+ struct acpi_object_extra {
+ ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
++ struct acpi_namespace_node *scope_node;
+ void *region_context; /* Region-specific data */
+ u8 *aml_start;
+ u32 aml_length;
+--- a/drivers/acpi/acpica/dsargs.c
++++ b/drivers/acpi/acpica/dsargs.c
+@@ -384,7 +384,7 @@ acpi_status acpi_ds_get_region_arguments
+
+ /* Execute the argument AML */
+
+- status = acpi_ds_execute_arguments(node, node->parent,
++ status = acpi_ds_execute_arguments(node, extra_desc->extra.scope_node,
+ extra_desc->extra.aml_length,
+ extra_desc->extra.aml_start);
+ if (ACPI_FAILURE(status)) {
+--- a/drivers/acpi/acpica/excreate.c
++++ b/drivers/acpi/acpica/excreate.c
+@@ -330,6 +330,12 @@ acpi_ex_create_region(u8 * aml_start,
+ region_obj2 = obj_desc->common.next_object;
+ region_obj2->extra.aml_start = aml_start;
+ region_obj2->extra.aml_length = aml_length;
++ if (walk_state->scope_info) {
++ region_obj2->extra.scope_node =
++ walk_state->scope_info->scope.node;
++ } else {
++ region_obj2->extra.scope_node = node;
++ }
+
+ /* Init the region from the operands */
+
--- /dev/null
+From 51b79bee627d526199b2f6a6bef8ee0c0739b6d1 Mon Sep 17 00:00:00 2001
+From: Jonghwan Choi <jhbird.choi@samsung.com>
+Date: Wed, 18 Apr 2012 17:23:04 -0400
+Subject: security: fix compile error in commoncap.c
+
+From: Jonghwan Choi <jhbird.choi@samsung.com>
+
+commit 51b79bee627d526199b2f6a6bef8ee0c0739b6d1 upstream.
+
+Add missing "personality.h"
+security/commoncap.c: In function 'cap_bprm_set_creds':
+security/commoncap.c:510: error: 'PER_CLEAR_ON_SETID' undeclared (first use in this function)
+security/commoncap.c:510: error: (Each undeclared identifier is reported only once
+security/commoncap.c:510: error: for each function it appears in.)
+
+Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
+Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
+Signed-off-by: James Morris <james.l.morris@oracle.com>
+Cc: Eric Paris <eparis@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ security/commoncap.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/security/commoncap.c
++++ b/security/commoncap.c
+@@ -28,6 +28,7 @@
+ #include <linux/prctl.h>
+ #include <linux/securebits.h>
+ #include <linux/user_namespace.h>
++#include <linux/personality.h>
+
+ /*
+ * If a non-root user executes a setuid-root binary in
bluetooth-hci_core-fix-null-pointer-dereference-at.patch
pch_gpio-support-new-device-lapis-semiconductor-ml7831-ioh.patch
gpio-add-missing-spin_lock_init-in-gpio-pch-driver.patch
+usb-gadget-pch_udc-fix-disconnect-issue.patch
+usb-gadget-pch_udc-fix-wrong-return-value.patch
+usb-gadget-pch_udc-fix-usb-suspend-issue.patch
+usb-gadget-pch_udc-fix-usb-gadget-pch_udc-fix-ether.patch
+usb-gadget-pch_udc-reduce-redundant-interrupt.patch
+acpica-fix-to-allow-region-arguments-to-reference-other-scopes.patch
+security-fix-compile-error-in-commoncap.c.patch
--- /dev/null
+From c50a3bff0edb0acd49d8033a12ea4668e09a31ad Mon Sep 17 00:00:00 2001
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Date: Thu, 12 Jan 2012 11:27:05 +0900
+Subject: usb: gadget: pch_udc: Fix disconnect issue
+
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+
+commit c50a3bff0edb0acd49d8033a12ea4668e09a31ad upstream.
+
+ISSUE:
+When the driver notifies a gadget of a disconnect event, a system
+rarely freezes.
+
+CAUSE:
+When the driver calls dev->driver->disconnect(), it is not calling
+spin_unlock().
+
+Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/pch_udc.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/pch_udc.c
++++ b/drivers/usb/gadget/pch_udc.c
+@@ -2335,8 +2335,11 @@ static void pch_udc_svc_ur_interrupt(str
+ /* Complete request queue */
+ empty_req_queue(ep);
+ }
+- if (dev->driver && dev->driver->disconnect)
++ if (dev->driver && dev->driver->disconnect) {
++ spin_unlock(&dev->lock);
+ dev->driver->disconnect(&dev->gadget);
++ spin_lock(&dev->lock);
++ }
+ }
+
+ /**
--- /dev/null
+From 1c575d2d2e3ff2a7cb3c2e2165064199cfd8ad32 Mon Sep 17 00:00:00 2001
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Date: Thu, 12 Jan 2012 11:27:08 +0900
+Subject: usb: gadget: pch_udc: Fix usb/gadget/pch_udc: Fix ether gadget connect/disconnect issue
+
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+
+commit 1c575d2d2e3ff2a7cb3c2e2165064199cfd8ad32 upstream.
+
+ISSUE:
+After a USB cable is connect/disconnected, the system rarely freezes.
+
+CAUSE:
+Since the USB device controller cannot know to disconnect the USB cable, when
+it is used without detecting VBUS by GPIO, the UDC driver does not notify to
+USB Gadget.
+
+Since USB Gadget cannot know to disconnect, a false setting occurred when the
+USB cable is connected/disconnect repeatedly.
+
+Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/pch_udc.c | 70 ++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 66 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/gadget/pch_udc.c
++++ b/drivers/usb/gadget/pch_udc.c
+@@ -311,6 +311,7 @@ struct pch_udc_ep {
+ * @registered: driver regsitered with system
+ * @suspended: driver in suspended state
+ * @connected: gadget driver associated
++ * @vbus_session: required vbus_session state
+ * @set_cfg_not_acked: pending acknowledgement 4 setup
+ * @waiting_zlp_ack: pending acknowledgement 4 ZLP
+ * @data_requests: DMA pool for data requests
+@@ -337,6 +338,7 @@ struct pch_udc_dev {
+ registered:1,
+ suspended:1,
+ connected:1,
++ vbus_session:1,
+ set_cfg_not_acked:1,
+ waiting_zlp_ack:1;
+ struct pci_pool *data_requests;
+@@ -554,6 +556,31 @@ static void pch_udc_clear_disconnect(str
+ }
+
+ /**
++ * pch_udc_reconnect() - This API initializes usb device controller,
++ * and clear the disconnect status.
++ * @dev: Reference to pch_udc_regs structure
++ */
++static void pch_udc_init(struct pch_udc_dev *dev);
++static void pch_udc_reconnect(struct pch_udc_dev *dev)
++{
++ pch_udc_init(dev);
++
++ /* enable device interrupts */
++ /* pch_udc_enable_interrupts() */
++ pch_udc_bit_clr(dev, UDC_DEVIRQMSK_ADDR,
++ UDC_DEVINT_UR | UDC_DEVINT_US |
++ UDC_DEVINT_ENUM |
++ UDC_DEVINT_SI | UDC_DEVINT_SC);
++
++ /* Clear the disconnect */
++ pch_udc_bit_set(dev, UDC_DEVCTL_ADDR, UDC_DEVCTL_RES);
++ pch_udc_bit_clr(dev, UDC_DEVCTL_ADDR, UDC_DEVCTL_SD);
++ mdelay(1);
++ /* Resume USB signalling */
++ pch_udc_bit_clr(dev, UDC_DEVCTL_ADDR, UDC_DEVCTL_RES);
++}
++
++/**
+ * pch_udc_vbus_session() - set or clearr the disconnect status.
+ * @dev: Reference to pch_udc_regs structure
+ * @is_active: Parameter specifying the action
+@@ -563,10 +590,18 @@ static void pch_udc_clear_disconnect(str
+ static inline void pch_udc_vbus_session(struct pch_udc_dev *dev,
+ int is_active)
+ {
+- if (is_active)
+- pch_udc_clear_disconnect(dev);
+- else
++ if (is_active) {
++ pch_udc_reconnect(dev);
++ dev->vbus_session = 1;
++ } else {
++ if (dev->driver && dev->driver->disconnect) {
++ spin_unlock(&dev->lock);
++ dev->driver->disconnect(&dev->gadget);
++ spin_lock(&dev->lock);
++ }
+ pch_udc_set_disconnect(dev);
++ dev->vbus_session = 0;
++ }
+ }
+
+ /**
+@@ -1126,7 +1161,17 @@ static int pch_udc_pcd_pullup(struct usb
+ if (!gadget)
+ return -EINVAL;
+ dev = container_of(gadget, struct pch_udc_dev, gadget);
+- pch_udc_vbus_session(dev, is_on);
++ if (is_on) {
++ pch_udc_reconnect(dev);
++ } else {
++ if (dev->driver && dev->driver->disconnect) {
++ spin_unlock(&dev->lock);
++ dev->driver->disconnect(&dev->gadget);
++ spin_lock(&dev->lock);
++ }
++ pch_udc_set_disconnect(dev);
++ }
++
+ return 0;
+ }
+
+@@ -2482,6 +2527,15 @@ static void pch_udc_dev_isr(struct pch_u
+ dev->driver->suspend(&dev->gadget);
+ spin_lock(&dev->lock);
+ }
++
++ if (dev->vbus_session == 0) {
++ if (dev->driver && dev->driver->disconnect) {
++ spin_unlock(&dev->lock);
++ dev->driver->disconnect(&dev->gadget);
++ spin_lock(&dev->lock);
++ }
++ pch_udc_reconnect(dev);
++ }
+ dev_dbg(&dev->pdev->dev, "USB_SUSPEND\n");
+ }
+ /* Clear the SOF interrupt, if enabled */
+@@ -2509,6 +2563,14 @@ static irqreturn_t pch_udc_isr(int irq,
+ dev_intr = pch_udc_read_device_interrupts(dev);
+ ep_intr = pch_udc_read_ep_interrupts(dev);
+
++ /* For a hot plug, this find that the controller is hung up. */
++ if (dev_intr == ep_intr)
++ if (dev_intr == pch_udc_readl(dev, UDC_DEVCFG_ADDR)) {
++ dev_dbg(&dev->pdev->dev, "UDC: Hung up\n");
++ /* The controller is reset */
++ pch_udc_writel(dev, UDC_SRST, UDC_SRST_ADDR);
++ return IRQ_HANDLED;
++ }
+ if (dev_intr)
+ /* Clear device interrupts */
+ pch_udc_write_device_interrupts(dev, dev_intr);
--- /dev/null
+From 84566abba058b2aae8d603dfa90b5a3778a6714f Mon Sep 17 00:00:00 2001
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Date: Thu, 12 Jan 2012 11:27:07 +0900
+Subject: usb: gadget: pch_udc: Fix USB suspend issue
+
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+
+commit 84566abba058b2aae8d603dfa90b5a3778a6714f upstream.
+
+ISSUE:
+After USB Suspend, a system rarely freezes.
+
+CAUSE:
+When USB Suspend occurred, the driver is not notifying
+a gadget of the event.
+
+Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/pch_udc.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/pch_udc.c
++++ b/drivers/usb/gadget/pch_udc.c
+@@ -2475,8 +2475,15 @@ static void pch_udc_dev_isr(struct pch_u
+ if (dev_intr & UDC_DEVINT_SC)
+ pch_udc_svc_cfg_interrupt(dev);
+ /* USB Suspend interrupt */
+- if (dev_intr & UDC_DEVINT_US)
++ if (dev_intr & UDC_DEVINT_US) {
++ if (dev->driver
++ && dev->driver->suspend) {
++ spin_unlock(&dev->lock);
++ dev->driver->suspend(&dev->gadget);
++ spin_lock(&dev->lock);
++ }
+ dev_dbg(&dev->pdev->dev, "USB_SUSPEND\n");
++ }
+ /* Clear the SOF interrupt, if enabled */
+ if (dev_intr & UDC_DEVINT_SOF)
+ dev_dbg(&dev->pdev->dev, "SOF\n");
--- /dev/null
+From c802672cd36cd063bfd54d54c8c34825ab5b2357 Mon Sep 17 00:00:00 2001
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Date: Thu, 12 Jan 2012 11:27:06 +0900
+Subject: usb: gadget: pch_udc: Fix wrong return value
+
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+
+commit c802672cd36cd063bfd54d54c8c34825ab5b2357 upstream.
+
+ISSUE:
+If the return value of pch_udc_pcd_init() is False, the return value of
+this function is unsettled.
+Since pch_udc_pcd_init() always returns 0, there is not actually the issue.
+
+CAUSE:
+If pch_udc_pcd_init() is True, the variable, retval, is not set for an
+appropriate value.
+
+Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/pch_udc.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/pch_udc.c
++++ b/drivers/usb/gadget/pch_udc.c
+@@ -2915,8 +2915,10 @@ static int pch_udc_probe(struct pci_dev
+ }
+ pch_udc = dev;
+ /* initialize the hardware */
+- if (pch_udc_pcd_init(dev))
++ if (pch_udc_pcd_init(dev)) {
++ retval = -ENODEV;
+ goto finished;
++ }
+ if (request_irq(pdev->irq, pch_udc_isr, IRQF_SHARED, KBUILD_MODNAME,
+ dev)) {
+ dev_err(&pdev->dev, "%s: request_irq(%d) fail\n", __func__,
--- /dev/null
+From 833310402c54ad9b676b465fc53ad276b13d36be Mon Sep 17 00:00:00 2001
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Date: Thu, 12 Jan 2012 11:27:09 +0900
+Subject: usb: gadget: pch_udc: Reduce redundant interrupt
+
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+
+commit 833310402c54ad9b676b465fc53ad276b13d36be upstream.
+
+ISSUE:
+USB Suspend interrupts occur frequently.
+
+CAUSE:
+When it is called pch_udc_reconnect() in USB Suspend, it repeats reset and
+Suspend.
+
+SOLUTION:
+pch_udc_reconnect() does not enable all interrupts. When an enumeration event
+occurred the driver enables all interrupts.
+
+Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/pch_udc.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/gadget/pch_udc.c
++++ b/drivers/usb/gadget/pch_udc.c
+@@ -568,9 +568,7 @@ static void pch_udc_reconnect(struct pch
+ /* enable device interrupts */
+ /* pch_udc_enable_interrupts() */
+ pch_udc_bit_clr(dev, UDC_DEVIRQMSK_ADDR,
+- UDC_DEVINT_UR | UDC_DEVINT_US |
+- UDC_DEVINT_ENUM |
+- UDC_DEVINT_SI | UDC_DEVINT_SC);
++ UDC_DEVINT_UR | UDC_DEVINT_ENUM);
+
+ /* Clear the disconnect */
+ pch_udc_bit_set(dev, UDC_DEVCTL_ADDR, UDC_DEVCTL_RES);
+@@ -2419,6 +2417,11 @@ static void pch_udc_svc_enum_interrupt(s
+ pch_udc_set_dma(dev, DMA_DIR_TX);
+ pch_udc_set_dma(dev, DMA_DIR_RX);
+ pch_udc_ep_set_rrdy(&(dev->ep[UDC_EP0OUT_IDX]));
++
++ /* enable device interrupts */
++ pch_udc_enable_interrupts(dev, UDC_DEVINT_UR | UDC_DEVINT_US |
++ UDC_DEVINT_ES | UDC_DEVINT_ENUM |
++ UDC_DEVINT_SI | UDC_DEVINT_SC);
+ }
+
+ /**