Re: [PATCH v3] u_ether: move hardware transmit to RX NAPI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



W dniu 30.05.2014 15:34, Weinn Jheng pisze:
In order to reduce the interrupt times in the embedded system,
a receiving workqueue is introduced.
This modification also enhanced the overall throughput as the
benefits of reducing interrupt occurrence.

Sorry, still problem:

[   29.934435] BUG: scheduling while atomic: swapper/0/0x00010003
[   29.938784] Modules linked in: usb_f_ecm g_ether usb_f_rndis u_ether libcomposite
[   29.946235] Preemption disabled at:[<  (null)>]   (null)
[   29.951521]
[   29.953003] CPU: 0 PID: 0 Comm: swapper Not tainted 3.15.0-rc4+ #461
[   29.959361] [<c00163ac>] (unwind_backtrace) from [<c0013224>] (show_stack+0x20/0x24)
[   29.967047] [<c0013224>] (show_stack) from [<c03ae0e8>] (dump_stack+0x20/0x28)
[   29.974244] [<c03ae0e8>] (dump_stack) from [<c03ab550>] (__schedule_bug+0x98/0xbc)
[   29.981775] [<c03ab550>] (__schedule_bug) from [<c03af48c>] (__schedule+0x42c/0x4ec)
[   29.989485] [<c03af48c>] (__schedule) from [<c03af6b8>] (schedule+0x40/0x90)
[   29.996504] [<c03af6b8>] (schedule) from [<c03aeba0>] (schedule_timeout+0x108/0x1dc)
[   30.004218] [<c03aeba0>] (schedule_timeout) from [<c03aeca4>] (schedule_timeout_uninterruptible+0x30/0x34)
[   30.013845] [<c03aeca4>] (schedule_timeout_uninterruptible) from [<c0030320>] (msleep+0x24/0x30)

This looks suspicious:

[   30.022604] [<c0030320>] (msleep) from [<bf0111fc>] (gether_disconnect+0x48/0x2b4 [u_ether])

[   30.031010] [<bf0111fc>] (gether_disconnect [u_ether]) from [<bf029544>] (ecm_disable+0x48/0x9c [usb_f_ecm])
[   30.040817] [<bf029544>] (ecm_disable [usb_f_ecm]) from [<bf000f10>] (reset_config+0x54/0xa0 [libcomposite])
[   30.050600] [<bf000f10>] (reset_config [libcomposite]) from [<bf0015ec>] (composite_disconnect+0x44/0x6c [libcomposite])
[   30.061425] [<bf0015ec>] (composite_disconnect [libcomposite]) from [<c02cf114>] (s3c_hsotg_disconnect+0x98/0xa4)
[   30.071638] [<c02cf114>] (s3c_hsotg_disconnect) from [<c02cf2a0>] (s3c_hsotg_complete_setup+0x180/0x508)
[   30.081090] [<c02cf2a0>] (s3c_hsotg_complete_setup) from [<c02cbcd4>] (s3c_hsotg_complete_request+0x98/0x14c)
[   30.090963] [<c02cbcd4>] (s3c_hsotg_complete_request) from [<c02cdbf0>] (s3c_hsotg_handle_outdone+0xc8/0x16c)
[   30.100839] [<c02cdbf0>] (s3c_hsotg_handle_outdone) from [<c02cede0>] (s3c_hsotg_irq+0x6b4/0x950)
[   30.109684] [<c02cede0>] (s3c_hsotg_irq) from [<c005f0e4>] (handle_irq_event_percpu+0x6c/0x28c)
[   30.118347] [<c005f0e4>] (handle_irq_event_percpu) from [<c005f350>] (handle_irq_event+0x4c/0x6c)
[   30.127186] [<c005f350>] (handle_irq_event) from [<c0061980>] (handle_level_irq+0xac/0x148)
[   30.135504] [<c0061980>] (handle_level_irq) from [<c005e8dc>] (generic_handle_irq+0x34/0x48)
[   30.143910] [<c005e8dc>] (generic_handle_irq) from [<c00106ec>] (handle_IRQ+0x54/0xc0)
[   30.151795] [<c00106ec>] (handle_IRQ) from [<c00085f8>] (vic_handle_irq+0x6c/0xac)
[   30.159332] [<c00085f8>] (vic_handle_irq) from [<c0013d84>] (__irq_svc+0x44/0x78)
[   30.166779] Exception stack(0xc0587f28 to 0xc0587f70)
[   30.171810] 7f20:                   c058e83c 00001198 c058e83c 00000000 c0586000 c05d2540
[   30.179955] 7f40: c0586000 c05cd3b0 c058e0d0 c05cd3b0 c0586000 c0587f7c c0587f70 c0587f70
[   30.188098] 7f60: c00108a0 c00108a4 60000013 ffffffff

When the gadget is physically disconnected we end up in interrupt context.
gether_disconnect() calls napi_disable() which, in certain circumstances,
calls msleep(). But please see include/linux/usb/gadget.h,
struct usb_gadget_driver, description of the disconnect() method:

"Invoked after all transfers have been stopped, when the host is disconnected.
May be called in_interrupt; this may not sleep."

This means that napi_disable() cannot be called where you call it.
If you need to call it, you have to do it in a context which can sleep.

AP



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux