diff options
author | John Crispin <john@phrozen.org> | 2018-05-07 12:07:32 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-05-24 22:11:55 +0200 |
commit | 050da2107a7eb2a571a8a3d0cee21cc6a44b72b8 (patch) | |
tree | 147c3b85ccae12e4b1659acd86ac93b13ecfa15d /target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch | |
parent | 4f67c1522d92bc4512c3ecf58c38ff9886530b48 (diff) | |
download | upstream-050da2107a7eb2a571a8a3d0cee21cc6a44b72b8.tar.gz upstream-050da2107a7eb2a571a8a3d0cee21cc6a44b72b8.tar.bz2 upstream-050da2107a7eb2a571a8a3d0cee21cc6a44b72b8.zip |
mediatek: backport upstream mediatek patches
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch')
-rw-r--r-- | target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch b/target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch new file mode 100644 index 0000000000..1c23d15eca --- /dev/null +++ b/target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch @@ -0,0 +1,34 @@ +From e315036cdbf8dad7cff4df9dfe8bcff2eddf2277 Mon Sep 17 00:00:00 2001 +From: Chunfeng Yun <chunfeng.yun@mediatek.com> +Date: Fri, 13 Oct 2017 17:10:45 +0800 +Subject: [PATCH 111/224] usb: mtu3: set invalid dr_mode as dual-role mode + +Treat dr_mode of USB_DR_MODE_UNKNOWN as USB_DR_MODE_OTG to +enhance functional robustness. + +Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> +Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> +--- + drivers/usb/mtu3/mtu3_plat.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c +index 7ca81f4e78a3..9ff33579b42e 100644 +--- a/drivers/usb/mtu3/mtu3_plat.c ++++ b/drivers/usb/mtu3/mtu3_plat.c +@@ -283,10 +283,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) + return PTR_ERR(ssusb->ippc_base); + + ssusb->dr_mode = usb_get_dr_mode(dev); +- if (ssusb->dr_mode == USB_DR_MODE_UNKNOWN) { +- dev_err(dev, "dr_mode is error\n"); +- return -EINVAL; +- } ++ if (ssusb->dr_mode == USB_DR_MODE_UNKNOWN) ++ ssusb->dr_mode = USB_DR_MODE_OTG; + + if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL) + return 0; +-- +2.11.0 + |