public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: uvc: Fixed the abnormal enumeration problem of mobile phone as UVC camera.
@ 2024-07-31  6:48 胡连勤
       [not found] ` <TYUPR06MB6217B2E6F3DEBE87541336A5D2B12@TYUPR06MB6217.apcprd06.prod.outlook.com>
  2024-07-31  7:28 ` gregkh
  0 siblings, 2 replies; 3+ messages in thread
From: 胡连勤 @ 2024-07-31  6:48 UTC (permalink / raw)
  To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org
  Cc: opensource.kernel

From c464558a70e1ca36c0e4bd0a121fb50565b44610 Mon Sep 17 00:00:00 2001
From: Lianqin Hu <hulianqin@vivo.com>
Date: Wed, 31 Jul 2024 14:21:52 +0800
Subject: [PATCH] usb: gadget: uvc: Fixed the abnormal enumeration problem of
 mobile phone as UVC camera.

When the phone is connected to the computer to use the webcam function,
the phone needs to be enumerated as a uvc camera function.

Because uvc->func.bind_deactivated is configured as true in the f_uvc
driver uvc_alloc function, the usb_gadget_deactivate function is called
during the execution of the configfs_composite_bind function to
set gadget->deactivated to true, which in turn causes the
usb_gadget_connect_locked function to fail to call the corresponding
controller pullup operation (such as: dwc3_gadget_pullup,
mtu3_gadget_pullup), and the USB cannot be enumerated
normally under the uvc function combination.

After applying this patch, we measured that under the uvc function,
the dwc3 controller and the mtu3 controller can be enumerated normally,
and the webcam function is normal.

Therefore, modify the f_uvc driver to remove the operation of setting
uvc->func.bind_deactivated to true.

Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
---
 drivers/usb/gadget/function/f_uvc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index 40187b7112e7..6d63bea14211 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -1107,7 +1107,6 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
 	uvc->func.disable = uvc_function_disable;
 	uvc->func.setup = uvc_function_setup;
 	uvc->func.free_func = uvc_free;
-	uvc->func.bind_deactivated = true;
 
 	return &uvc->func;
 
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: 回复: [PATCH] usb: gadget: uvc: Fixed the abnormal enumeration problem of  mobile phone as UVC camera.
       [not found] ` <TYUPR06MB6217B2E6F3DEBE87541336A5D2B12@TYUPR06MB6217.apcprd06.prod.outlook.com>
@ 2024-07-31  7:27   ` gregkh
  0 siblings, 0 replies; 3+ messages in thread
From: gregkh @ 2024-07-31  7:27 UTC (permalink / raw)
  To: 胡连勤
  Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	opensource.kernel

On Wed, Jul 31, 2024 at 07:03:41AM +0000, 胡连勤 wrote:
> Hello linux community expert:

<snip>

Please fix your email client to not send html email, as the mailing
lists reject this.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: gadget: uvc: Fixed the abnormal enumeration problem of mobile phone as UVC camera.
  2024-07-31  6:48 [PATCH] usb: gadget: uvc: Fixed the abnormal enumeration problem of mobile phone as UVC camera 胡连勤
       [not found] ` <TYUPR06MB6217B2E6F3DEBE87541336A5D2B12@TYUPR06MB6217.apcprd06.prod.outlook.com>
@ 2024-07-31  7:28 ` gregkh
  1 sibling, 0 replies; 3+ messages in thread
From: gregkh @ 2024-07-31  7:28 UTC (permalink / raw)
  To: 胡连勤
  Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	opensource.kernel

On Wed, Jul 31, 2024 at 06:48:57AM +0000, 胡连勤 wrote:
> From c464558a70e1ca36c0e4bd0a121fb50565b44610 Mon Sep 17 00:00:00 2001
> From: Lianqin Hu <hulianqin@vivo.com>
> Date: Wed, 31 Jul 2024 14:21:52 +0800
> Subject: [PATCH] usb: gadget: uvc: Fixed the abnormal enumeration problem of
>  mobile phone as UVC camera.

Why is this in the body of the email?  Please fix up, and also, properly
handle this being a new version of an old submission as the
documentation asks you to.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-31  7:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31  6:48 [PATCH] usb: gadget: uvc: Fixed the abnormal enumeration problem of mobile phone as UVC camera 胡连勤
     [not found] ` <TYUPR06MB6217B2E6F3DEBE87541336A5D2B12@TYUPR06MB6217.apcprd06.prod.outlook.com>
2024-07-31  7:27   ` 回复: " gregkh
2024-07-31  7:28 ` gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox