From 2cfbb1400230f380d60f27e549e390c0f0e00001 Mon Sep 17 00:00:00 2001 From: Andrey Gusakov Date: Tue, 27 Mar 2018 15:24:58 +0300 Subject: VB2: disable autosuspend for TUSB8041 hub --- ...-disable-autosuspend-for-SMSC-and-TI-hubs.patch | 58 ++++++++++++++++++++++ ...usb-hub-disable-autosuspend-for-SMSC-hubs.patch | 51 ------------------- .../linux/linux-renesas_4.9.bbappend | 2 +- 3 files changed, 59 insertions(+), 52 deletions(-) create mode 100644 meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0072-usb-hub-disable-autosuspend-for-SMSC-and-TI-hubs.patch delete mode 100644 meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0072-usb-hub-disable-autosuspend-for-SMSC-hubs.patch diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0072-usb-hub-disable-autosuspend-for-SMSC-and-TI-hubs.patch b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0072-usb-hub-disable-autosuspend-for-SMSC-and-TI-hubs.patch new file mode 100644 index 0000000..7adfb2e --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0072-usb-hub-disable-autosuspend-for-SMSC-and-TI-hubs.patch @@ -0,0 +1,58 @@ +From f05c07d846b5b815709cd741a85e922ddb72b958 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Fri, 11 Aug 2017 17:30:40 +0300 +Subject: [PATCH] usb: hub: disable autosuspend for SMSC and TI hubs + +Disable autosuspend for SMSC hubs (USB5534B/USB2134B devices) and +TI hub (TUSB8041) +This is a workaround for RCar Gen3 XHCI on VB and VB2 + +Signed-off-by: Vladimir Barinov +Signed-off-by: Andrey Gusakov +--- + drivers/usb/core/hub.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c +index cbb1467..6f5575f 100644 +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -34,7 +34,10 @@ + #include "otg_whitelist.h" + + #define USB_VENDOR_GENESYS_LOGIC 0x05e3 ++#define USB_VENDOR_SMSC 0x0424 ++#define USB_VENDOR_TI 0x0451 + #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01 ++#define HUB_QUIRK_DISABLE_AUTOSUSPEND 0x02 + + /* Protect struct usb_device->state and ->children members + * Note: Both are also protected by ->dev.sem, except that ->state can +@@ -1845,6 +1848,9 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) + if (id->driver_info & HUB_QUIRK_CHECK_PORT_AUTOSUSPEND) + hub->quirk_check_port_auto_suspend = 1; + ++ if (id->driver_info & HUB_QUIRK_DISABLE_AUTOSUSPEND) ++ pm_runtime_set_autosuspend_delay(&hdev->dev, -1); ++ + if (hub_configure(hub, endpoint) >= 0) + return 0; + +@@ -5226,6 +5232,14 @@ static void hub_event(struct work_struct *work) + } + + static const struct usb_device_id hub_id_table[] = { ++ { .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_CLASS, ++ .idVendor = USB_VENDOR_SMSC, ++ .bInterfaceClass = USB_CLASS_HUB, ++ .driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND}, ++ { .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_CLASS, ++ .idVendor = USB_VENDOR_TI, ++ .bInterfaceClass = USB_CLASS_HUB, ++ .driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND}, + { .match_flags = USB_DEVICE_ID_MATCH_VENDOR + | USB_DEVICE_ID_MATCH_INT_CLASS, + .idVendor = USB_VENDOR_GENESYS_LOGIC, +-- +1.9.1 + diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0072-usb-hub-disable-autosuspend-for-SMSC-hubs.patch b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0072-usb-hub-disable-autosuspend-for-SMSC-hubs.patch deleted file mode 100644 index 4989e05..0000000 --- a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0072-usb-hub-disable-autosuspend-for-SMSC-hubs.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 8276db72581e4d1e3f89ccce84555c9fea145e16 Mon Sep 17 00:00:00 2001 -From: Vladimir Barinov -Date: Fri, 11 Aug 2017 17:30:40 +0300 -Subject: [PATCH] usb: hub: disable autosuspend for SMSC hubs - -Disable autosuspend for SMSC hubs (USB5534B/USB2134B devices) -This is a workaround for RCar Gen3 XHCI - -Signed-off-by: Vladimir Barinov ---- - drivers/usb/core/hub.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index cbb1467..2c4c006 100644 ---- a/drivers/usb/core/hub.c -+++ b/drivers/usb/core/hub.c -@@ -34,7 +34,9 @@ - #include "otg_whitelist.h" - - #define USB_VENDOR_GENESYS_LOGIC 0x05e3 -+#define USB_VENDOR_SMSC 0x0424 - #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01 -+#define HUB_QUIRK_DISABLE_AUTOSUSPEND 0x02 - - /* Protect struct usb_device->state and ->children members - * Note: Both are also protected by ->dev.sem, except that ->state can -@@ -1845,6 +1847,9 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) - if (id->driver_info & HUB_QUIRK_CHECK_PORT_AUTOSUSPEND) - hub->quirk_check_port_auto_suspend = 1; - -+ if (id->driver_info & HUB_QUIRK_DISABLE_AUTOSUSPEND) -+ pm_runtime_set_autosuspend_delay(&hdev->dev, -1); -+ - if (hub_configure(hub, endpoint) >= 0) - return 0; - -@@ -5226,6 +5231,10 @@ static void hub_event(struct work_struct *work) - } - - static const struct usb_device_id hub_id_table[] = { -+ { .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_CLASS, -+ .idVendor = USB_VENDOR_SMSC, -+ .bInterfaceClass = USB_CLASS_HUB, -+ .driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND}, - { .match_flags = USB_DEVICE_ID_MATCH_VENDOR - | USB_DEVICE_ID_MATCH_INT_CLASS, - .idVendor = USB_VENDOR_GENESYS_LOGIC, --- -1.9.1 - diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend index 066f96b..9672e2b 100644 --- a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend +++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend @@ -63,7 +63,7 @@ SRC_URI_append = " \ file://0068-drm-adv7511-use-smbus-to-retrieve-edid.patch \ file://0070-clk-clk-5p49x-add-5P49V5925-chip.patch \ file://0071-ASoC-add-dummy-device-for-WL18xx-PCM-audio.patch \ - file://0072-usb-hub-disable-autosuspend-for-SMSC-hubs.patch \ + file://0072-usb-hub-disable-autosuspend-for-SMSC-and-TI-hubs.patch \ file://0073-MOST-dim2-add-device-tree-support.patch \ file://0074-MOST-dim2-add-R-Car3-related-initialization.patch \ file://0075-MOST-core-fix-memory-allocation-at-arm64.patch \ -- cgit 1.2.3-korg