Patch "usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED" has been added to the 4.7-stable tree
Subsystems (3)
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 <[email protected]> know about it.
Quoted 1 line
From
ab2a92e7a608c09f13baf1730b9ba24c73c35d52Mon Sep 17 00:00:00 2001
From: Felipe Balbi <[email protected]>
Date: Tue, 17 May 2016 14:55:58 +0300
Subject: usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED
From: Felipe Balbi <[email protected]>
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.
--- drivers/usb/dwc3/gadget.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/usb/dwc3/gadget.c +7 -5
@@ -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 [email protected] 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