diff mbox series

[Bionic,3/3] usb: core: Add USB_QUIRK_DELAY_CTRL_MSG to usbcore quirks

Message ID 20180410094931.22512-4-kai.heng.feng@canonical.com
State New
Headers show
Series Backport USB core quirks | expand

Commit Message

Kai-Heng Feng April 10, 2018, 9:49 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1762695

There's a new quirk, USB_QUIRK_DELAY_CTRL_MSG. Add it to usbcore quirks
for completeness.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4d8d5a392ae110d9b5889afd2b4beef9a09e712d)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 Documentation/admin-guide/kernel-parameters.txt | 4 +++-
 drivers/usb/core/quirks.c                       | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 969f48683313..6091973f844a 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4407,7 +4407,9 @@ 
 					calculation);
 				m = USB_QUIRK_DISCONNECT_SUSPEND (Device needs
 					to be disconnected before suspend to
-					prevent spurious wakeup)
+					prevent spurious wakeup);
+				n = USB_QUIRK_DELAY_CTRL_MSG (Device needs a
+					pause after every control message);
 			Example: quirks=0781:5580:bk,0a5c:5834:gij
 
 	usbhid.mousepoll=
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index a4f53e1f1ce1..84ccbb0424c2 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -124,6 +124,9 @@  static int quirks_param_set(const char *val, const struct kernel_param *kp)
 			case 'm':
 				flags |= USB_QUIRK_DISCONNECT_SUSPEND;
 				break;
+			case 'n':
+				flags |= USB_QUIRK_DELAY_CTRL_MSG;
+				break;
 			/* Ignore unrecognized flag characters */
 			}
 		}