William Wu 3f2358d458 usb: dwc3: gadget: avoid multiple calls to free_irq
When we use /sys/class/udc/<udc>/soft_connect to do
a logical disconnection from the USB Host on RK3399
Excavator Board, it dumps the warning log:

Trying to free already-free IRQ 231
WARNING: CPU: 2 PID: 1308 at kernel/irq/manage.c:1628 __free_irq+0xa0/0x2e0
Modules linked in:
CPU: 2 PID: 1308 Comm: adbd Not tainted 4.19.80 #49
Hardware name: Rockchip RK3399 Excavator Board edp avb (Android) (DT)
pstate: 40400085 (nZcv daIf +PAN -UAO)
pc : __free_irq+0xa0/0x2e0
lr : __free_irq+0xa0/0x2e0
...
Call trace:
__free_irq+0xa0/0x2e0
free_irq+0x38/0x90
dwc3_gadget_stop+0x58/0x80
usb_gadget_remove_driver+0x50/0x70
usb_gadget_unregister_driver+0xc0/0x110
unregister_gadget+0x20/0x50
unregister_gadget_item+0x24/0x38
ffs_data_clear+0x120/0x130
ffs_data_reset+0x14/0x50
ffs_data_closed+0x88/0xd8
ffs_epfile_release+0x20/0x30

To solve the problem, don't call free_irq() in
dwc3_gadget_stop() if dwc->gadget_driver is NULL.

Change-Id: I9d5b5b354612c3ce3677b3d15cf6af1fcbf3f399
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-11-14 11:17:26 +08:00
2019-02-10 00:33:21 +08:00
2019-10-11 19:13:57 +02:00
2019-08-06 20:08:18 +02:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-08-29 19:45:37 +08:00
2019-08-29 19:45:37 +08:00
2019-10-17 15:33:07 -07:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%