USB以太网不适用于Linux内核(3.14.35)

时间:2015-10-21 09:22:36

标签: linux-kernel kernel kernel-module ethernet usbserial

我正在使用Linux Kernel v3.14.35。我需要提供以太网支持USB。

我在内核配置中进行了修改。它工作正常。

我从两侧获得了接口作为usb0的名称。

我配置了IP地址并尝试ping。我发现了一些崩溃和跟踪回溯。

[  153.356767] c0 1601 (ifconfig) ------------[ cut here ]------------
[  153.363079] c0 1601 (ifconfig) WARNING: CPU: 0 PID: 1601 at kernel/workqueue.c:1393 __queue_work+0x254/0x368()
[  153.373077] Modules linked in: g_ether usb_f_rndis usb_f_ecm_subset usb_f_ecm libcomposite u_ether
[  153.382104] c0 1601 (ifconfig) CPU: 0 PID: 1601 Comm: ifconfig Not   tainted 3.14.35 #7
[  153.389963] c0 1601 (ifconfig) [<c0016db4>] (unwind_backtrace) from [<c0012e78>] (show_stack+0x10/0x14)
[  153.399371] c0 1601 (ifconfig) [<c0012e78>] (show_stack) from [<c0758af0>] (dump_stack+0x7c/0xbc)
[  153.408254] c0 1601 (ifconfig) [<c0758af0>] (dump_stack) from [<c002a754>] (warn_slowpath_common+0x70/0x8c)
[  153.418000] c0 1601 (ifconfig) [<c002a754>] (warn_slowpath_common) from [<c002a80c>] (warn_slowpath_null+0x1c/0x24)
[  153.428441] c0 1601 (ifconfig) [<c002a80c>] (warn_slowpath_null) from [<c0042218>] (__queue_work+0x254/0x368)
[  153.438365] c0 1601 (ifconfig) [<c0042218>] (__queue_work) from [<c0042374>] (queue_work_on+0x48/0x54)
[  153.447682] c0 1601 (ifconfig) [<c0042374>] (queue_work_on) from [<c03e5f24>] (done+0x110/0x1b0)
[  153.456474] c0 1601 (ifconfig) [<c03e5f24>] (done) from [<c03e8aac>] (mv_udc_irq+0x75c/0xf20)
[  153.465010] c0 1601 (ifconfig) [<c03e8aac>] (mv_udc_irq) from [<c0075820>] (handle_irq_event_percpu+0x6c/0x298)
[  153.475112] c0 1601 (ifconfig) [<c0075820>] (handle_irq_event_percpu) from [<c0075a88>] (handle_irq_event+0x3c/0x5c)
[  153.485638] c0 1601 (ifconfig) [<c0075a88>] (handle_irq_event) from [<c0078960>] (handle_fasteoi_irq+0x84/0x14c)
[  153.495822] c0 1601 (ifconfig) [<c0078960>] (handle_fasteoi_irq) from [<c0074f7c>] (generic_handle_irq+0x2c/0x3c)
[  153.506090] c0 1601 (ifconfig) [<c0074f7c>] (generic_handle_irq) from [<c000f8fc>] (handle_IRQ+0x40/0x90)
[  153.515664] c0 1601 (ifconfig) [<c000f8fc>] (handle_IRQ) from [<c0008618>] (gic_handle_irq+0x2c/0x5c)
[  153.524892] c0 1601 (ifconfig) [<c0008618>] (gic_handle_irq) from [<c00139c0>] (__irq_svc+0x40/0x70)
[  153.534026] c0 1601 (ifconfig) Exception stack(0xec09bdb8 to 0xec09be00)
[  153.540729] c0 1601 (ifconfig) bda0:                                                       ec219500 a0000013
[  153.550558] c0 1601 (ifconfig) bdc0: 00000001 00000009 ec219500 ebe78c24 00000000 00000004 ec219510 000000d0
[  153.560395] c0 1601 (ifconfig) bde0: a0000013 ebe65900 2ec010c0 ec09be00 bf001824 c075e224 20000013 ffffffff
[  153.570232] c0 1601 (ifconfig) [<c00139c0>] (__irq_svc) from [<c075e224>] (_raw_spin_unlock_irqrestore+0x20/0x54)
[  153.580511] c0 1601 (ifconfig) [<c075e224>] (_raw_spin_unlock_irqrestore) from [<bf001824>] (rx_fill+0x1e0/0x2ac [u_ether])
[  153.591656] c0 1601 (ifconfig) [<bf001824>] (rx_fill [u_ether]) from [<bf0018fc>] (eth_start+0xc/0x38 [u_ether])
[  153.601842] c0 1601 (ifconfig) [<bf0018fc>] (eth_start [u_ether]) from [<bf001984>] (eth_open+0x5c/0x60 [u_ether])
[  153.612209] c0 1601 (ifconfig) [<bf001984>] (eth_open [u_ether]) from [<c05c83fc>] (__dev_open+0xa8/0x10c)
[  153.621874] c0 1601 (ifconfig) [<c05c83fc>] (__dev_open) from [<c05c8684>] (__dev_change_flags+0x94/0x168)
[  153.631533] c0 1601 (ifconfig) [<c05c8684>] (__dev_change_flags) from [<c05c8770>] (dev_change_flags+0x18/0x48)
[  153.641630] c0 1601 (ifconfig) [<c05c8770>] (dev_change_flags) from [<c06551b4>] (devinet_ioctl+0x7c8/0x89c)
[  153.651466] c0 1601 (ifconfig) [<c06551b4>] (devinet_ioctl) from [<c05b0434>] (sock_ioctl+0x130/0x28c)
[  153.660782] c0 1601 (ifconfig) [<c05b0434>] (sock_ioctl) from [<c0139898>] (do_vfs_ioctl+0x3f0/0x5b8)
[  153.670005] c0 1601 (ifconfig) [<c0139898>] (do_vfs_ioctl) from [<c0139acc>] (SyS_ioctl+0x6c/0x7c)
[  153.678971] c0 1601 (ifconfig) [<c0139acc>] (SyS_ioctl) from [<c000f020>] (ret_fast_syscall+0x0/0x30)
[  153.688195] c0 1601 (ifconfig)
---[ end trace 165fce7ec193769d ]---

我能够从设备ping到主机但无法处理从主机发送的确认。

1 个答案:

答案 0 :(得分:0)

我得到了解决方案。我修改了udc(USB设备控制器)的驱动程序。所以我可以在Linux Kernel 3.14.35中通过USB访问以太网。