[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c7f19b4e-469c-4e40-bd2e-e864ca5f7872@rowland.harvard.edu>
Date: Wed, 17 May 2023 10:44:53 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: Badhri Jagan Sridharan <badhri@...gle.com>
Cc: gregkh@...uxfoundation.org, colin.i.king@...il.com,
xuetao09@...wei.com, quic_eserrao@...cinc.com,
water.zhangjiantao@...wei.com, peter.chen@...escale.com,
balbi@...com, francesco@...cini.it, alistair@...stair23.me,
stephan@...hold.net, bagasdotme@...il.com, luca@...tu.xyz,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org,
Francesco Dolcini <francesco.dolcini@...adex.com>
Subject: Re: [PATCH v1] usb: gadget: udc: core: Offload usb_udc_vbus_handler
processing
On Wed, May 17, 2023 at 11:59:55AM +0000, Badhri Jagan Sridharan wrote:
> chipidea udc calls usb_udc_vbus_handler from udc_start gadget
> ops causing a deadlock. Avoid this by offloading usb_udc_vbus_handler
> processing.
Surely that is the wrong approach.
The real problem here is that usb_udc_vbus_handler() gets called from
within a udc_start routine. But this is totally unnecessary, because
the UDC core will call usb_udc_connect_control_locked() itself, later on
during gadget_bind_driver().
So a proper solution would be simply to remove the unnecessary
usb_udc_vbus_handler() call from the chipidea driver (and similarly for
the max3420_udc driver).
Similar changes may be needed in these drivers' udc_stop routines.
Alan Stern
Powered by blists - more mailing lists