usb: CtsVerifier.apk usb device test failed [1/1]
authorhe.he <he.he@amlogic.com>
Thu, 5 Sep 2019 09:21:34 +0000 (05:21 -0400)
committerhe.he <he.he@amlogic.com>
Fri, 6 Sep 2019 02:04:54 +0000 (22:04 -0400)
PD#SWPL-13498

Problem:
The printing may delay the usb_disconnect processing, result to
USB transfer error during reconnecting.

Solution:
Moving the print in proc_setconfig of devio.c .

Verify:
test pass on sm1

Change-Id: I5c45abb2d5d640e2e02dc3e0c08b10ca7a294eeb
Signed-off-by: he.he <he.he@amlogic.com>
drivers/usb/core/devio.c

index 52fc2084b310db59653d74deddd219bd32f011b6..b5fa9f0fe34e2dcdaea8e04c4dfb5a8a0c98bfa3 100644 (file)
@@ -1388,6 +1388,10 @@ static int proc_setconfig(struct usb_dev_state *ps, void __user *arg)
 
                for (i = 0; i < actconfig->desc.bNumInterfaces; ++i) {
                        if (usb_interface_claimed(actconfig->interface[i])) {
+       /*This print could cause usb cts test fail,since it could
+        *delay the interrupt of the hub_event for usb_disconnect.
+        */
+#ifndef CONFIG_AMLOGIC_USB
                                dev_warn(&ps->dev->dev,
                                        "usbfs: interface %d claimed by %s "
                                        "while '%s' sets config #%d\n",
@@ -1397,6 +1401,7 @@ static int proc_setconfig(struct usb_dev_state *ps, void __user *arg)
                                        actconfig->interface[i]
                                                ->dev.driver->name,
                                        current->comm, u);
+#endif
                                status = -EBUSY;
                                break;
                        }