All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED" has been added to the 4.7-stable tree
@ 2016-08-17 12:54 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-08-17 12:54 UTC (permalink / raw)
  To: felipe.balbi, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED

to the 4.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     usb-dwc3-gadget-only-resume-usb2-phy-in-highspeed.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From ab2a92e7a608c09f13baf1730b9ba24c73c35d52 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi@linux.intel.com>
Date: Tue, 17 May 2016 14:55:58 +0300
Subject: usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED

From: Felipe Balbi <felipe.balbi@linux.intel.com>

commit ab2a92e7a608c09f13baf1730b9ba24c73c35d52 upstream.

As a micro-power optimization, let's only resume the
USB2 PHY if we're working on <=HIGHSPEED. If we're
gonna work on SUPERSPEED or SUPERSPEED+, there's no
point in resuming the USB2 PHY.

Fixes: 2b0f11df84bb ("usb: dwc3: gadget: clear SUSPHY bit before ep cmds")
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/dwc3/gadget.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -258,11 +258,13 @@ int dwc3_send_gadget_ep_cmd(struct dwc3
 	 * We will also set SUSPHY bit to what it was before returning as stated
 	 * by the same section on Synopsys databook.
 	 */
-	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
-	if (unlikely(reg & DWC3_GUSB2PHYCFG_SUSPHY)) {
-		susphy = true;
-		reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
-		dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
+	if (dwc->gadget.speed <= USB_SPEED_HIGH) {
+		reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
+		if (unlikely(reg & DWC3_GUSB2PHYCFG_SUSPHY)) {
+			susphy = true;
+			reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
+			dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
+		}
 	}
 
 	if (cmd == DWC3_DEPCMD_STARTTRANSFER) {


Patches currently in stable-queue which might be from felipe.balbi@linux.intel.com are

queue-4.7/usb-renesas_usbhs-protect-the-cfifosel-setting-in-usbhsg_ep_enable.patch
queue-4.7/usb-gadget-pch_udc-reorder-spin_lock-to-avoid-deadlock.patch
queue-4.7/usb-dwc3-gadget-only-resume-usb2-phy-in-highspeed.patch
queue-4.7/usb-renesas_usbhs-fix-null-pointer-dereference-in-xfer_work.patch
queue-4.7/usb-gadget-udc-atmel-also-get-regmap-for-at91sam9x5-pmc.patch
queue-4.7/usb-dwc3-fix-for-the-isoc-transfer-ep_busy-flag.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-17 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-17 12:54 Patch "usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED" has been added to the 4.7-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.