Skip to content

Commit

Permalink
Revert "usb: dwc3: gadget: start requests as soon as they come"
Browse files Browse the repository at this point in the history
This reverts commit 118694c.

The reverted commit was causing 50% eunumeration failures for
mass_storage gadget with the below backtrace.

The commit was supposed to make dwc3 little faster. However,
testing with mass storage gadget on am437x-gp-evm (with backing
storage in RAM) gives no diffrence in performance with or without
the patch.

We choose to sacrifice any (minor) performance gain for
stability.

[   73.526467] ------------[ cut here ]------------
[   73.531230] WARNING: CPU: 0 PID: 2195 at drivers/usb/dwc3/ep0.c:306 dwc3_ep0_out_start+0x44/0x50 [dwc3]()
[   73.540854] Modules linked in: g_mass_storage usb_f_mass_storage libcomposite ipv6 xhci_plat_hcd xhci_hcd usbcore evdev joydev dwc3 pru_rproc udc_core ti_am335x_adc kfifo_c
[   73.582299] CPU: 0 PID: 2195 Comm: irq/266-dwc3 Not tainted 4.1.18-00998-ga6a31ce torvalds#211
[   73.590267] Hardware name: Generic AM43 (Flattened Device Tree)
[   73.596224] Backtrace:
[   73.598751] [<c0012b2c>] (dump_backtrace) from [<c0012cc8>] (show_stack+0x18/0x1c)
[   73.606366]  r6:00000000 r5:00000000 r4:20000093 r3:00000000
[   73.612152] [<c0012cb0>] (show_stack) from [<c0623200>] (dump_stack+0x94/0xb4)
[   73.619448] [<c062316c>] (dump_stack) from [<c0041f40>] (warn_slowpath_common+0x80/0xbc)
[   73.627585]  r6:00000132 r5:bf0f6854 r4:00000000 r3:ed1cc000
[   73.633361] [<c0041ec0>] (warn_slowpath_common) from [<c0041fa0>] (warn_slowpath_null+0x24/0x2c)
[   73.642194]  r8:00000000 r7:0000030c r6:00000000 r5:f22c5000 r4:ee494010
[   73.649073] [<c0041f7c>] (warn_slowpath_null) from [<bf0f6854>] (dwc3_ep0_out_start+0x44/0x50 [dwc3])
[   73.658434] [<bf0f6810>] (dwc3_ep0_out_start [dwc3]) from [<bf0f6b0c>] (dwc3_ep0_interrupt+0x1dc/0xae4 [dwc3])
[   73.668570] [<bf0f6930>] (dwc3_ep0_interrupt [dwc3]) from [<bf0f4be8>] (dwc3_thread_interrupt+0x7f4/0x9e4 [dwc3])
[   73.678890]  r10:ed17e380 r9:00000000 r8:00000000 r7:0000030c r6:ee494010 r5:00000004
[   73.686847]  r4:ed66e890
[   73.689461] [<bf0f43f4>] (dwc3_thread_interrupt [dwc3]) from [<c0081a14>] (irq_thread_fn+0x24/0x3c)
[   73.698558]  r10:00000000 r9:00000001 r8:ed4047c0 r7:ed13f780 r6:ed13f780 r5:00000000
[   73.706513]  r4:ed4047c0
[   73.709094] [<c00819f0>] (irq_thread_fn) from [<c0081be8>] (irq_thread+0x158/0x1b8)
[   73.716795]  r6:00000001 r5:00000000 r4:ed4047e0 r3:c00819f0
[   73.722575] [<c0081a90>] (irq_thread) from [<c005b138>] (kthread+0xdc/0xf8)
[   73.729578]  r10:00000000 r9:00000000 r8:00000000 r7:c0081a90 r6:ed4047c0 r5:ed4045c0
[   73.737531]  r4:00000000
[   73.740121] [<c005b05c>] (kthread) from [<c000fc28>] (ret_from_fork+0x14/0x2c)
[   73.747384]  r7:00000000 r6:00000000 r5:c005b05c r4:ed4045c0
[   73.753140] ---[ end trace 7a5e0f83644dd200 ]---

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
  • Loading branch information
Roger Quadros authored and nsekhar committed Feb 29, 2016
1 parent 3884ba4 commit 8945045
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,20 +1071,6 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)

list_add_tail(&req->list, &dep->request_list);

/*
* If there are no pending requests and the endpoint isn't already
* busy, we will just start the request straight away.
*
* This will save one IRQ (XFER_NOT_READY) and possibly make it a
* little bit faster.
*/
if (!usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
!usb_endpoint_xfer_int(dep->endpoint.desc) &&
!(dep->flags & DWC3_EP_BUSY)) {
ret = __dwc3_gadget_kick_transfer(dep, 0, true);
goto out;
}

/*
* There are a few special cases:
*
Expand Down

0 comments on commit 8945045

Please sign in to comment.