aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/dwc2/core_intr.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-03 18:05:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-03 18:05:27 +0200
commit3515468a87a47781f6af818773650513ff14656a (patch)
tree55241860ef8d7cf670c0d042aafd02976d0ef370 /drivers/usb/dwc2/core_intr.c
parentMerge 5.1-rc7 into usb-next (diff)
parentusb: dwc3: Rename DWC3_DCTL_LPM_ERRATA (diff)
downloadwireguard-linux-3515468a87a47781f6af818773650513ff14656a.tar.xz
wireguard-linux-3515468a87a47781f6af818773650513ff14656a.zip
Merge tag 'usb-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes: USB: changes for v5.2 merge window With a total of 50 non-merge commits, this is not a large pull request. Most of the changes are, again, in dwc2 (37%) and dwc3 (32%) with the rest of it scattered among other UDCs, function drivers and device-tree bindings. No really big feature this time around apart from support to Amlogic being added to both dwc3 and dwc2 drivers. * tag 'usb-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (50 commits) usb: dwc3: Rename DWC3_DCTL_LPM_ERRATA usb: dwc3: Fix default lpm_nyet_threshold value usb: dwc3: debug: Print GET_STATUS(device) tracepoint usb: dwc3: Do core validation early on probe usb: dwc3: gadget: Set lpm_capable usb: gadget: atmel: tie wake lock to running clock usb: gadget: atmel: support USB suspend usb: gadget: atmel_usba_udc: simplify setting of interrupt-enabled mask dwc2: gadget: Fix completed transfer size calculation in DDMA usb: dwc2: Set lpm mode parameters depend on HW configuration usb: dwc2: Fix channel disable flow usb: dwc2: Set actual frame number for completed ISOC transfer usb: gadget: do not use __constant_cpu_to_le16 usb: dwc2: gadget: Increase descriptors count for ISOC's usb: introduce usb_ep_type_string() function usb: dwc3: move synchronize_irq() out of the spinlock protected block usb: dwc3: Free resource immediately after use usb: dwc3: of-simple: Convert to bulk clk API usb: dwc2: Delayed status support usb: gadget: udc: lpc32xx: rework interrupt handling ...
Diffstat (limited to 'drivers/usb/dwc2/core_intr.c')
-rw-r--r--drivers/usb/dwc2/core_intr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
index 19ae2595f1c3..6af6add3d4c0 100644
--- a/drivers/usb/dwc2/core_intr.c
+++ b/drivers/usb/dwc2/core_intr.c
@@ -435,6 +435,18 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
/* Restart the Phy Clock */
pcgcctl &= ~PCGCTL_STOPPCLK;
dwc2_writel(hsotg, pcgcctl, PCGCTL);
+
+ /*
+ * If we've got this quirk then the PHY is stuck upon
+ * wakeup. Assert reset. This will propagate out and
+ * eventually we'll re-enumerate the device. Not great
+ * but the best we can do. We can't call phy_reset()
+ * at interrupt time but there's no hurry, so we'll
+ * schedule it for later.
+ */
+ if (hsotg->reset_phy_on_wake)
+ dwc2_host_schedule_phy_reset(hsotg);
+
mod_timer(&hsotg->wkp_timer,
jiffies + msecs_to_jiffies(71));
} else {