summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/host.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2020-01-14 21:11:26 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2020-01-14 21:11:26 +0100
commit8e87e181b7ce77478bf0c0f9906149925371127c (patch)
tree207b03b672aa3a2e19748cb5b6e3dfac88da0e04 /drivers/usb/chipidea/host.c
parentbddad4a0ef9b9d63af534cfa364d658a31a9d950 (diff)
parent05bbb560f4f40fef38df338f87a17852a308d9dc (diff)
Merge 4.4.210 into android-4.4-p
Changes in 4.4.210 kobject: Export kobject_get_unless_zero() chardev: Avoid potential use-after-free in 'chrdev_open()' usb: chipidea: host: Disable port power only if previously enabled ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5 kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined HID: Fix slab-out-of-bounds read in hid_field_extract HID: uhid: Fix returning EPOLLOUT from uhid_char_poll HID: hid-input: clear unmapped usages Input: add safety guards to input_set_keycode() drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ can: gs_usb: gs_usb_probe(): use descriptors of current altsetting can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode can: can_dropped_invalid_skb(): ensure an initialized headroom in outgoing CAN sk_buffs staging: vt6656: set usb_set_intfdata on driver fail. USB: serial: option: add ZLP support for 0x1bc7/0x9010 usb: musb: Disable pullup at init usb: musb: dma: Correct parameter passed to IRQ handler staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21 tty: link tty and port before configuring it as console tty: always relink the port mwifiex: fix possible heap overflow in mwifiex_process_country_ie() mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf scsi: bfa: release allocated memory in case of error rtl8xxxu: prevent leaking urb USB: Fix: Don't skip endpoint descriptors with maxpacket=0 netfilter: arp_tables: init netns pointer in xt_tgchk_param struct netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present drm/i915/gen9: Clear residual context state on context switch Linux 4.4.210 Change-Id: I5ee00026c7108d6a3a1a2711e7413f05defc64ce Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/usb/chipidea/host.c')
-rw-r--r--drivers/usb/chipidea/host.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index 3d24304405b3..496788584034 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -37,6 +37,7 @@ static int (*orig_bus_suspend)(struct usb_hcd *hcd);
struct ehci_ci_priv {
struct regulator *reg_vbus;
+ bool enabled;
};
static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable)
@@ -48,7 +49,7 @@ static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable)
int ret = 0;
int port = HCS_N_PORTS(ehci->hcs_params);
- if (priv->reg_vbus) {
+ if (priv->reg_vbus && enable != priv->enabled) {
if (port > 1) {
dev_warn(dev,
"Not support multi-port regulator control\n");
@@ -64,6 +65,7 @@ static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable)
enable ? "enable" : "disable", ret);
return ret;
}
+ priv->enabled = enable;
}
if (enable && (ci->platdata->phy_mode == USBPHY_INTERFACE_MODE_HSIC)) {