]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.16-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2014 22:21:01 +0000 (15:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2014 22:21:01 +0000 (15:21 -0700)
added patches:
usb-chipidea-msm-initialize-phy-on-reset-event.patch
usb-chipidea-msm-use-usb-phy-api-to-control-phy-state.patch
usb-ftdi_sio-add-support-for-ge-healthcare-nemo-tracker-device.patch
usb-ftdi_sio-add-support-for-novitus-bono-e-thermal-printer.patch
usb-phy-tegra-avoid-use-of-sizeof-void.patch
usb-phy-twl4030-usb-fix-lost-interrupts-after-id-pin-goes-down.patch
usb-phy-twl4030-usb-fix-regressions-to-runtime-pm-on-omaps.patch
usb-sierra-add-1199-68aa-device-id.patch
usb-sierra-avoid-cdc-class-functions-on-68a3-devices.patch

queue-3.16/series
queue-3.16/usb-chipidea-msm-initialize-phy-on-reset-event.patch [new file with mode: 0644]
queue-3.16/usb-chipidea-msm-use-usb-phy-api-to-control-phy-state.patch [new file with mode: 0644]
queue-3.16/usb-ftdi_sio-add-support-for-ge-healthcare-nemo-tracker-device.patch [new file with mode: 0644]
queue-3.16/usb-ftdi_sio-add-support-for-novitus-bono-e-thermal-printer.patch [new file with mode: 0644]
queue-3.16/usb-phy-tegra-avoid-use-of-sizeof-void.patch [new file with mode: 0644]
queue-3.16/usb-phy-twl4030-usb-fix-lost-interrupts-after-id-pin-goes-down.patch [new file with mode: 0644]
queue-3.16/usb-phy-twl4030-usb-fix-regressions-to-runtime-pm-on-omaps.patch [new file with mode: 0644]
queue-3.16/usb-sierra-add-1199-68aa-device-id.patch [new file with mode: 0644]
queue-3.16/usb-sierra-avoid-cdc-class-functions-on-68a3-devices.patch [new file with mode: 0644]

index 7e3d81bd870b17f0b34dc8acc0e3e867f7a1bb18..38ecc175748e0da89be1e7a5e371a50d0f68e1dc 100644 (file)
@@ -115,3 +115,12 @@ usb-option-add-via-telecom-cds7-chipset-device-id.patch
 revert-usb-option-zte_ev-move-most-zte-cdma-devices-to-zte_ev.patch
 usb-zte_ev-remove-duplicate-gobi-pid.patch
 usb-zte_ev-remove-duplicate-qualcom-pid.patch
+usb-sierra-avoid-cdc-class-functions-on-68a3-devices.patch
+usb-sierra-add-1199-68aa-device-id.patch
+usb-phy-tegra-avoid-use-of-sizeof-void.patch
+usb-phy-twl4030-usb-fix-lost-interrupts-after-id-pin-goes-down.patch
+usb-phy-twl4030-usb-fix-regressions-to-runtime-pm-on-omaps.patch
+usb-chipidea-msm-use-usb-phy-api-to-control-phy-state.patch
+usb-chipidea-msm-initialize-phy-on-reset-event.patch
+usb-ftdi_sio-add-support-for-ge-healthcare-nemo-tracker-device.patch
+usb-ftdi_sio-add-support-for-novitus-bono-e-thermal-printer.patch
diff --git a/queue-3.16/usb-chipidea-msm-initialize-phy-on-reset-event.patch b/queue-3.16/usb-chipidea-msm-initialize-phy-on-reset-event.patch
new file mode 100644 (file)
index 0000000..8172fc1
--- /dev/null
@@ -0,0 +1,30 @@
+From 233c7daf4eecd1e992dc42591182cd4a892e687c Mon Sep 17 00:00:00 2001
+From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
+Date: Thu, 11 Sep 2014 08:19:00 +0800
+Subject: usb: chipidea: msm: Initialize PHY on reset event
+
+From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
+
+commit 233c7daf4eecd1e992dc42591182cd4a892e687c upstream.
+
+Initialize USB PHY after every Link controller reset
+
+Cc: Tim Bird <tbird20d@gmail.com>
+Signed-off-by: Peter Chen <peter.chen@freescale.com>
+Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/chipidea/ci_hdrc_msm.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/chipidea/ci_hdrc_msm.c
++++ b/drivers/usb/chipidea/ci_hdrc_msm.c
+@@ -26,6 +26,7 @@ static void ci_hdrc_msm_notify_event(str
+               dev_dbg(dev, "CI_HDRC_CONTROLLER_RESET_EVENT received\n");
+               writel(0, USB_AHBBURST);
+               writel(0, USB_AHBMODE);
++              usb_phy_init(ci->transceiver);
+               break;
+       case CI_HDRC_CONTROLLER_STOPPED_EVENT:
+               dev_dbg(dev, "CI_HDRC_CONTROLLER_STOPPED_EVENT received\n");
diff --git a/queue-3.16/usb-chipidea-msm-use-usb-phy-api-to-control-phy-state.patch b/queue-3.16/usb-chipidea-msm-use-usb-phy-api-to-control-phy-state.patch
new file mode 100644 (file)
index 0000000..a24d3c8
--- /dev/null
@@ -0,0 +1,44 @@
+From ea290056d7c46f7781ff13801048ed957b96d1a5 Mon Sep 17 00:00:00 2001
+From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
+Date: Thu, 11 Sep 2014 08:18:59 +0800
+Subject: usb: chipidea: msm: Use USB PHY API to control PHY state
+
+From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
+
+commit ea290056d7c46f7781ff13801048ed957b96d1a5 upstream.
+
+PHY drivers keep track of the current state of the hardware,
+so don't change PHY settings under it.
+
+Cc: Tim Bird <tbird20d@gmail.com>
+Signed-off-by: Peter Chen <peter.chen@freescale.com>
+Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
+Acked-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/chipidea/ci_hdrc_msm.c |    6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+--- a/drivers/usb/chipidea/ci_hdrc_msm.c
++++ b/drivers/usb/chipidea/ci_hdrc_msm.c
+@@ -20,7 +20,6 @@
+ static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event)
+ {
+       struct device *dev = ci->gadget.dev.parent;
+-      int val;
+       switch (event) {
+       case CI_HDRC_CONTROLLER_RESET_EVENT:
+@@ -34,10 +33,7 @@ static void ci_hdrc_msm_notify_event(str
+                * Put the transceiver in non-driving mode. Otherwise host
+                * may not detect soft-disconnection.
+                */
+-              val = usb_phy_io_read(ci->transceiver, ULPI_FUNC_CTRL);
+-              val &= ~ULPI_FUNC_CTRL_OPMODE_MASK;
+-              val |= ULPI_FUNC_CTRL_OPMODE_NONDRIVING;
+-              usb_phy_io_write(ci->transceiver, val, ULPI_FUNC_CTRL);
++              usb_phy_notify_disconnect(ci->transceiver, USB_SPEED_UNKNOWN);
+               break;
+       default:
+               dev_dbg(dev, "unknown ci_hdrc event\n");
diff --git a/queue-3.16/usb-ftdi_sio-add-support-for-ge-healthcare-nemo-tracker-device.patch b/queue-3.16/usb-ftdi_sio-add-support-for-ge-healthcare-nemo-tracker-device.patch
new file mode 100644 (file)
index 0000000..5b67d99
--- /dev/null
@@ -0,0 +1,41 @@
+From 9c491c372d677b6420e0f8c6361fe422791662cc Mon Sep 17 00:00:00 2001
+From: Taylor Braun-Jones <taylor.braun-jones@ge.com>
+Date: Thu, 7 Aug 2014 14:25:06 -0400
+Subject: USB: ftdi_sio: Add support for GE Healthcare Nemo Tracker device
+
+From: Taylor Braun-Jones <taylor.braun-jones@ge.com>
+
+commit 9c491c372d677b6420e0f8c6361fe422791662cc upstream.
+
+Signed-off-by: Taylor Braun-Jones <taylor.braun-jones@ge.com>
+Cc: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c     |    2 ++
+ drivers/usb/serial/ftdi_sio_ids.h |    6 ++++++
+ 2 files changed, 8 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -952,6 +952,8 @@ static const struct usb_device_id id_tab
+       { USB_DEVICE(FTDI_VID, FTDI_EKEY_CONV_USB_PID) },
+       /* Infineon Devices */
+       { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) },
++      /* GE Healthcare devices */
++      { USB_DEVICE(GE_HEALTHCARE_VID, GE_HEALTHCARE_NEMO_TRACKER_PID) },
+       { }                                     /* Terminating entry */
+ };
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -1385,3 +1385,9 @@
+  * ekey biometric systems GmbH (http://ekey.net/)
+  */
+ #define FTDI_EKEY_CONV_USB_PID                0xCB08  /* Converter USB */
++
++/*
++ * GE Healthcare devices
++ */
++#define GE_HEALTHCARE_VID             0x1901
++#define GE_HEALTHCARE_NEMO_TRACKER_PID        0x0015
diff --git a/queue-3.16/usb-ftdi_sio-add-support-for-novitus-bono-e-thermal-printer.patch b/queue-3.16/usb-ftdi_sio-add-support-for-novitus-bono-e-thermal-printer.patch
new file mode 100644 (file)
index 0000000..30616e8
--- /dev/null
@@ -0,0 +1,45 @@
+From ee444609dbae8afee420c3243ce4c5f442efb622 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Mon, 18 Aug 2014 18:33:11 +0200
+Subject: USB: ftdi_sio: add support for NOVITUS Bono E thermal printer
+
+From: Johan Hovold <johan@kernel.org>
+
+commit ee444609dbae8afee420c3243ce4c5f442efb622 upstream.
+
+Add device id for NOVITUS Bono E thermal printer.
+
+Reported-by: Emanuel Koczwara <poczta@emanuelkoczwara.pl>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c     |    1 +
+ drivers/usb/serial/ftdi_sio_ids.h |    6 ++++++
+ 2 files changed, 7 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -741,6 +741,7 @@ static const struct usb_device_id id_tab
+       { USB_DEVICE(FTDI_VID, FTDI_NDI_AURORA_SCU_PID),
+               .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk },
+       { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) },
++      { USB_DEVICE(NOVITUS_VID, NOVITUS_BONO_E_PID) },
+       { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_S03_PID) },
+       { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_59_PID) },
+       { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_57A_PID) },
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -837,6 +837,12 @@
+ #define TELLDUS_TELLSTICK_PID         0x0C30  /* RF control dongle 433 MHz using FT232RL */
+ /*
++ * NOVITUS printers
++ */
++#define NOVITUS_VID                   0x1a28
++#define NOVITUS_BONO_E_PID            0x6010
++
++/*
+  * RT Systems programming cables for various ham radios
+  */
+ #define RTSYSTEMS_VID         0x2100  /* Vendor ID */
diff --git a/queue-3.16/usb-phy-tegra-avoid-use-of-sizeof-void.patch b/queue-3.16/usb-phy-tegra-avoid-use-of-sizeof-void.patch
new file mode 100644 (file)
index 0000000..f98bb01
--- /dev/null
@@ -0,0 +1,40 @@
+From 9ce9ec95fb9b82e09b55a52f1bb8a362bf8f74d8 Mon Sep 17 00:00:00 2001
+From: Thierry Reding <treding@nvidia.com>
+Date: Mon, 21 Jul 2014 13:37:37 +0200
+Subject: usb: phy: tegra: Avoid use of sizeof(void)
+
+From: Thierry Reding <treding@nvidia.com>
+
+commit 9ce9ec95fb9b82e09b55a52f1bb8a362bf8f74d8 upstream.
+
+The PHY configuration is stored in an opaque "config" field, but when
+allocating the structure, its proper size needs to be known. In the case
+of UTMI, the proper structure is tegra_utmip_config of which a local
+variable already exists, so we can use that to obtain the size from.
+
+Fixes the following warning from the sparse checker:
+
+       drivers/usb/phy/phy-tegra-usb.c:882:17: warning: expression using sizeof(void)
+
+Fixes: 81d5dfe6d8b3 (usb: phy: tegra: Read UTMIP parameters from device tree)
+Signed-off-by: Thierry Reding <treding@nvidia.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/phy/phy-tegra-usb.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/phy/phy-tegra-usb.c
++++ b/drivers/usb/phy/phy-tegra-usb.c
+@@ -881,8 +881,8 @@ static int utmi_phy_probe(struct tegra_u
+               return -ENOMEM;
+       }
+-      tegra_phy->config = devm_kzalloc(&pdev->dev,
+-              sizeof(*tegra_phy->config), GFP_KERNEL);
++      tegra_phy->config = devm_kzalloc(&pdev->dev, sizeof(*config),
++                                       GFP_KERNEL);
+       if (!tegra_phy->config) {
+               dev_err(&pdev->dev,
+                       "unable to allocate memory for USB UTMIP config\n");
diff --git a/queue-3.16/usb-phy-twl4030-usb-fix-lost-interrupts-after-id-pin-goes-down.patch b/queue-3.16/usb-phy-twl4030-usb-fix-lost-interrupts-after-id-pin-goes-down.patch
new file mode 100644 (file)
index 0000000..ce04088
--- /dev/null
@@ -0,0 +1,92 @@
+From 85601b8d81e24ce9ae2d31e93f35468ab7616b18 Mon Sep 17 00:00:00 2001
+From: Tony Lindgren <tony@atomide.com>
+Date: Sun, 24 Aug 2014 17:44:22 +0530
+Subject: usb: phy: twl4030-usb: Fix lost interrupts after ID pin goes down
+
+From: Tony Lindgren <tony@atomide.com>
+
+commit 85601b8d81e24ce9ae2d31e93f35468ab7616b18 upstream.
+
+Commit 249751f22380 ("usb: phy: twl4030-usb: poll for ID disconnect")
+added twl4030_id_workaround_work() to deal with lost interrupts
+after ID pin goes down. Looks like commit f1ddc24c9e33 ("usb: phy:
+twl4030-usb: remove *set_suspend* and *phy_init* ops") changed
+things around for the generic phy framework, and delayed work no
+longer got called except initially during boot.
+
+The PHY connect and disconnect interrupts for twl4030-usb are not
+working after disconnecting a USB-A cable from the board, and the
+deeper idle states for omap are blocked as the USB controller
+stays busy.
+
+The issue can be solved by calling delayed work from twl4030_usb_irq()
+when ID pin is down and the PHY is not asleep like we already do
+in twl4030_id_workaround_work().
+
+But as both twl4030_usb_irq() and twl4030_id_workaround_work()
+already do pretty much the same thing, let's call twl4030_usb_irq()
+from twl4030_id_workaround_work() instead of adding some more
+duplicate code. We also must call sysfs_notify() only when we have
+an interrupt and not from the delayed work as notified by
+Grazvydas Ignotas <notasas@gmail.com>.
+
+Fixes: f1ddc24c9e33 ("usb: phy: twl4030-usb: remove *set_suspend* and *phy_init* ops")
+Acked-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/phy/phy-twl4030-usb.c |   33 ++++++++++-----------------------
+ 1 file changed, 10 insertions(+), 23 deletions(-)
+
+--- a/drivers/phy/phy-twl4030-usb.c
++++ b/drivers/phy/phy-twl4030-usb.c
+@@ -560,7 +560,15 @@ static irqreturn_t twl4030_usb_irq(int i
+                */
+               omap_musb_mailbox(status);
+       }
+-      sysfs_notify(&twl->dev->kobj, NULL, "vbus");
++
++      /* don't schedule during sleep - irq works right then */
++      if (status == OMAP_MUSB_ID_GROUND && !twl->asleep) {
++              cancel_delayed_work(&twl->id_workaround_work);
++              schedule_delayed_work(&twl->id_workaround_work, HZ);
++      }
++
++      if (irq)
++              sysfs_notify(&twl->dev->kobj, NULL, "vbus");
+       return IRQ_HANDLED;
+ }
+@@ -569,29 +577,8 @@ static void twl4030_id_workaround_work(s
+ {
+       struct twl4030_usb *twl = container_of(work, struct twl4030_usb,
+               id_workaround_work.work);
+-      enum omap_musb_vbus_id_status status;
+-      bool status_changed = false;
+-
+-      status = twl4030_usb_linkstat(twl);
+-
+-      spin_lock_irq(&twl->lock);
+-      if (status >= 0 && status != twl->linkstat) {
+-              twl->linkstat = status;
+-              status_changed = true;
+-      }
+-      spin_unlock_irq(&twl->lock);
+-      if (status_changed) {
+-              dev_dbg(twl->dev, "handle missing status change to %d\n",
+-                              status);
+-              omap_musb_mailbox(status);
+-      }
+-
+-      /* don't schedule during sleep - irq works right then */
+-      if (status == OMAP_MUSB_ID_GROUND && !twl->asleep) {
+-              cancel_delayed_work(&twl->id_workaround_work);
+-              schedule_delayed_work(&twl->id_workaround_work, HZ);
+-      }
++      twl4030_usb_irq(0, twl);
+ }
+ static int twl4030_phy_init(struct phy *phy)
diff --git a/queue-3.16/usb-phy-twl4030-usb-fix-regressions-to-runtime-pm-on-omaps.patch b/queue-3.16/usb-phy-twl4030-usb-fix-regressions-to-runtime-pm-on-omaps.patch
new file mode 100644 (file)
index 0000000..fa86d2a
--- /dev/null
@@ -0,0 +1,228 @@
+From 96be39ab34b77c6f6f5cd6ae03aac6c6449ee5c4 Mon Sep 17 00:00:00 2001
+From: Tony Lindgren <tony@atomide.com>
+Date: Wed, 20 Aug 2014 12:07:00 -0700
+Subject: usb: phy: twl4030-usb: Fix regressions to runtime PM on omaps
+
+From: Tony Lindgren <tony@atomide.com>
+
+commit 96be39ab34b77c6f6f5cd6ae03aac6c6449ee5c4 upstream.
+
+Commit 30a70b026b4cd ("usb: musb: fix obex in g_nokia.ko causing kernel
+panic") attempted to fix runtime PM handling for PHYs that are on the
+I2C bus. Commit 3063a12be2b0 ("usb: musb: fix PHY power on/off") then
+changed things around to enable of PHYs that rely on runtime PM.
+
+These changes however broke idling of the PHY and causes at least
+100 mW extra power consumption on omaps, which is a lot with
+the idle power consumption being below 10 mW range on many devices.
+
+As calling phy_power_on/off from runtime PM calls in the USB
+causes complicated issues with I2C connected PHYs, let's just let
+the PHY do it's own runtime PM as needed. This leaves out the
+dependency between PHYs and USB controller drivers for runtime
+PM.
+
+Let's fix the regression for twl4030-usb by adding minimal runtime
+PM support. This allows idling the PHY on disconnect.
+
+Note that we are changing to use standard runtime PM handling
+for twl4030_phy_init() as that function just checks the state
+and does not initialize the PHY. The PHY won't get initialized
+until in twl4030_phy_power_on().
+
+Fixes: 30a70b026b4cd ("usb: musb: fix obex in g_nokia.ko causing kernel panic")
+Fixes: 3063a12be2b0 ("usb: musb: fix PHY power on/off")
+Acked-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/phy/phy-twl4030-usb.c |   88 ++++++++++++++++++++++++++++++------------
+ 1 file changed, 63 insertions(+), 25 deletions(-)
+
+--- a/drivers/phy/phy-twl4030-usb.c
++++ b/drivers/phy/phy-twl4030-usb.c
+@@ -34,6 +34,7 @@
+ #include <linux/delay.h>
+ #include <linux/usb/otg.h>
+ #include <linux/phy/phy.h>
++#include <linux/pm_runtime.h>
+ #include <linux/usb/musb-omap.h>
+ #include <linux/usb/ulpi.h>
+ #include <linux/i2c/twl.h>
+@@ -422,37 +423,55 @@ static void twl4030_phy_power(struct twl
+       }
+ }
+-static int twl4030_phy_power_off(struct phy *phy)
++static int twl4030_usb_runtime_suspend(struct device *dev)
+ {
+-      struct twl4030_usb *twl = phy_get_drvdata(phy);
++      struct twl4030_usb *twl = dev_get_drvdata(dev);
++      dev_dbg(twl->dev, "%s\n", __func__);
+       if (twl->asleep)
+               return 0;
+       twl4030_phy_power(twl, 0);
+       twl->asleep = 1;
+-      dev_dbg(twl->dev, "%s\n", __func__);
++
+       return 0;
+ }
+-static void __twl4030_phy_power_on(struct twl4030_usb *twl)
++static int twl4030_usb_runtime_resume(struct device *dev)
+ {
++      struct twl4030_usb *twl = dev_get_drvdata(dev);
++
++      dev_dbg(twl->dev, "%s\n", __func__);
++      if (!twl->asleep)
++              return 0;
++
+       twl4030_phy_power(twl, 1);
+-      twl4030_i2c_access(twl, 1);
+-      twl4030_usb_set_mode(twl, twl->usb_mode);
+-      if (twl->usb_mode == T2_USB_MODE_ULPI)
+-              twl4030_i2c_access(twl, 0);
++      twl->asleep = 0;
++
++      return 0;
++}
++
++static int twl4030_phy_power_off(struct phy *phy)
++{
++      struct twl4030_usb *twl = phy_get_drvdata(phy);
++
++      dev_dbg(twl->dev, "%s\n", __func__);
++      pm_runtime_mark_last_busy(twl->dev);
++      pm_runtime_put_autosuspend(twl->dev);
++
++      return 0;
+ }
+ static int twl4030_phy_power_on(struct phy *phy)
+ {
+       struct twl4030_usb *twl = phy_get_drvdata(phy);
+-      if (!twl->asleep)
+-              return 0;
+-      __twl4030_phy_power_on(twl);
+-      twl->asleep = 0;
+       dev_dbg(twl->dev, "%s\n", __func__);
++      pm_runtime_get_sync(twl->dev);
++      twl4030_i2c_access(twl, 1);
++      twl4030_usb_set_mode(twl, twl->usb_mode);
++      if (twl->usb_mode == T2_USB_MODE_ULPI)
++              twl4030_i2c_access(twl, 0);
+       /*
+        * XXX When VBUS gets driven after musb goes to A mode,
+@@ -558,6 +577,16 @@ static irqreturn_t twl4030_usb_irq(int i
+                * USB_LINK_VBUS state.  musb_hdrc won't care until it
+                * starts to handle softconnect right.
+                */
++              if ((status == OMAP_MUSB_VBUS_VALID) ||
++                  (status == OMAP_MUSB_ID_GROUND)) {
++                      if (twl->asleep)
++                              pm_runtime_get_sync(twl->dev);
++              } else {
++                      if (!twl->asleep) {
++                              pm_runtime_mark_last_busy(twl->dev);
++                              pm_runtime_put_autosuspend(twl->dev);
++                      }
++              }
+               omap_musb_mailbox(status);
+       }
+@@ -586,22 +615,17 @@ static int twl4030_phy_init(struct phy *
+       struct twl4030_usb *twl = phy_get_drvdata(phy);
+       enum omap_musb_vbus_id_status status;
+-      /*
+-       * Start in sleep state, we'll get called through set_suspend()
+-       * callback when musb is runtime resumed and it's time to start.
+-       */
+-      __twl4030_phy_power(twl, 0);
+-      twl->asleep = 1;
+-
++      pm_runtime_get_sync(twl->dev);
+       status = twl4030_usb_linkstat(twl);
+       twl->linkstat = status;
+-      if (status == OMAP_MUSB_ID_GROUND || status == OMAP_MUSB_VBUS_VALID) {
++      if (status == OMAP_MUSB_ID_GROUND || status == OMAP_MUSB_VBUS_VALID)
+               omap_musb_mailbox(twl->linkstat);
+-              twl4030_phy_power_on(phy);
+-      }
+       sysfs_notify(&twl->dev->kobj, NULL, "vbus");
++      pm_runtime_mark_last_busy(twl->dev);
++      pm_runtime_put_autosuspend(twl->dev);
++
+       return 0;
+ }
+@@ -637,6 +661,11 @@ static const struct phy_ops ops = {
+       .owner          = THIS_MODULE,
+ };
++static const struct dev_pm_ops twl4030_usb_pm_ops = {
++      SET_RUNTIME_PM_OPS(twl4030_usb_runtime_suspend,
++                         twl4030_usb_runtime_resume, NULL)
++};
++
+ static int twl4030_usb_probe(struct platform_device *pdev)
+ {
+       struct twl4030_usb_data *pdata = dev_get_platdata(&pdev->dev);
+@@ -713,6 +742,11 @@ static int twl4030_usb_probe(struct plat
+       ATOMIC_INIT_NOTIFIER_HEAD(&twl->phy.notifier);
++      pm_runtime_use_autosuspend(&pdev->dev);
++      pm_runtime_set_autosuspend_delay(&pdev->dev, 2000);
++      pm_runtime_enable(&pdev->dev);
++      pm_runtime_get_sync(&pdev->dev);
++
+       /* Our job is to use irqs and status from the power module
+        * to keep the transceiver disabled when nothing's connected.
+        *
+@@ -731,6 +765,9 @@ static int twl4030_usb_probe(struct plat
+               return status;
+       }
++      pm_runtime_mark_last_busy(&pdev->dev);
++      pm_runtime_put_autosuspend(twl->dev);
++
+       dev_info(&pdev->dev, "Initialized TWL4030 USB module\n");
+       return 0;
+ }
+@@ -740,6 +777,7 @@ static int twl4030_usb_remove(struct pla
+       struct twl4030_usb *twl = platform_get_drvdata(pdev);
+       int val;
++      pm_runtime_get_sync(twl->dev);
+       cancel_delayed_work(&twl->id_workaround_work);
+       device_remove_file(twl->dev, &dev_attr_vbus);
+@@ -759,9 +797,8 @@ static int twl4030_usb_remove(struct pla
+       /* disable complete OTG block */
+       twl4030_usb_clear_bits(twl, POWER_CTRL, POWER_CTRL_OTG_ENAB);
+-
+-      if (!twl->asleep)
+-              twl4030_phy_power(twl, 0);
++      pm_runtime_mark_last_busy(twl->dev);
++      pm_runtime_put(twl->dev);
+       return 0;
+ }
+@@ -779,6 +816,7 @@ static struct platform_driver twl4030_us
+       .remove         = twl4030_usb_remove,
+       .driver         = {
+               .name   = "twl4030_usb",
++              .pm     = &twl4030_usb_pm_ops,
+               .owner  = THIS_MODULE,
+               .of_match_table = of_match_ptr(twl4030_usb_id_table),
+       },
diff --git a/queue-3.16/usb-sierra-add-1199-68aa-device-id.patch b/queue-3.16/usb-sierra-add-1199-68aa-device-id.patch
new file mode 100644 (file)
index 0000000..7c60def
--- /dev/null
@@ -0,0 +1,36 @@
+From 5b3da69285c143b7ea76b3b9f73099ff1093ab73 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+Date: Thu, 28 Aug 2014 15:08:16 +0200
+Subject: USB: sierra: add 1199:68AA device ID
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+
+commit 5b3da69285c143b7ea76b3b9f73099ff1093ab73 upstream.
+
+This VID:PID is used for some Direct IP devices behaving
+identical to the already supported 0F3D:68AA devices.
+
+Reported-by: Lars Melin <larsm17@gmail.com>
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/sierra.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/serial/sierra.c
++++ b/drivers/usb/serial/sierra.c
+@@ -286,6 +286,9 @@ static const struct usb_device_id id_tab
+       { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68A3, 0xFF, 0xFF, 0xFF),
+         .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
+       },
++      { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68AA, 0xFF, 0xFF, 0xFF),
++        .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
++      },
+       /* AT&T Direct IP LTE modems */
+       { USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68AA, 0xFF, 0xFF, 0xFF),
+         .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
diff --git a/queue-3.16/usb-sierra-avoid-cdc-class-functions-on-68a3-devices.patch b/queue-3.16/usb-sierra-avoid-cdc-class-functions-on-68a3-devices.patch
new file mode 100644 (file)
index 0000000..c5d8074
--- /dev/null
@@ -0,0 +1,53 @@
+From 049255f51644c1105775af228396d187402a5934 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+Date: Thu, 28 Aug 2014 14:11:23 +0200
+Subject: USB: sierra: avoid CDC class functions on "68A3" devices
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+
+commit 049255f51644c1105775af228396d187402a5934 upstream.
+
+Sierra Wireless Direct IP devices using the 68A3 product ID
+can be configured for modes including a CDC ECM class function.
+The known example uses interface numbers 12 and 13 for the ECM
+control and data interfaces respectively, consistent with CDC
+MBIM function interface numbering on other Sierra devices.
+
+It seems cleaner to restrict this driver to the ff/ff/ff
+vendor specific interfaces rather than increasing the already
+long interface number blacklist.  This should be more future
+proof if Sierra adds more class functions using interface
+numbers not yet in the blacklist.
+
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/sierra.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/serial/sierra.c
++++ b/drivers/usb/serial/sierra.c
+@@ -282,14 +282,16 @@ static const struct usb_device_id id_tab
+       /* Sierra Wireless HSPA Non-Composite Device */
+       { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6892, 0xFF, 0xFF, 0xFF)},
+       { USB_DEVICE(0x1199, 0x6893) }, /* Sierra Wireless Device */
+-      { USB_DEVICE(0x1199, 0x68A3),   /* Sierra Wireless Direct IP modems */
++      /* Sierra Wireless Direct IP modems */
++      { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68A3, 0xFF, 0xFF, 0xFF),
+         .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
+       },
+       /* AT&T Direct IP LTE modems */
+       { USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68AA, 0xFF, 0xFF, 0xFF),
+         .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
+       },
+-      { USB_DEVICE(0x0f3d, 0x68A3),   /* Airprime/Sierra Wireless Direct IP modems */
++      /* Airprime/Sierra Wireless Direct IP modems */
++      { USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68A3, 0xFF, 0xFF, 0xFF),
+         .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
+       },