我正在编写USB串行适配器设备驱动程序。内核是3.17.4。驱动程序工作正常,除了内核打开适配器两次并在插入适配器时写入一些命令。这是驱动程序的open()和write()的dump_stack()。
第一个打开()和写()。内核写了“ATE1 E0”三次。
<4>[19964.897631] Call Trace:
<4>[19964.897642] [<ffffffff8173f929>] dump_stack+0x45/0x56
<4>[19964.897649] [<ffffffffa04aa1ef>] c0087_open+0x2f/0x160 [usb_com_1p_driver]
<4>[19964.897654] [<ffffffff81744bb2>] ? down_write+0x12/0x40
<4>[19964.897661] [<ffffffff81566f75>] serial_port_activate+0x65/0x90
<4>[19964.897667] [<ffffffff8145e864>] ? tty_port_tty_set+0x64/0xa0
<4>[19964.897671] [<ffffffff8145edf9>] tty_port_open+0x89/0xe0
<4>[19964.897675] [<ffffffff81567bf3>] serial_open+0x33/0x70
<4>[19964.897679] [<ffffffff814560eb>] tty_open+0x17b/0x700
<4>[19964.897684] [<ffffffff8149cf72>] ? kobj_lookup+0x112/0x170
<4>[19964.897690] [<ffffffff81211017>] chrdev_open+0xb7/0x1a0
<4>[19964.897694] [<ffffffff81210f60>] ? cdev_put+0x30/0x30
<4>[19964.897698] [<ffffffff81209832>] do_dentry_open+0x1d2/0x320
<4>[19964.897702] [<ffffffff81209b61>] finish_open+0x31/0x50
<4>[19964.897706] [<ffffffff8121cd7c>] do_last+0xc0c/0x11d0
<4>[19964.897710] [<ffffffff81217bd8>] ? inode_permission+0x18/0x50
<4>[19964.897713] [<ffffffff812180e9>] ? link_path_walk+0x99/0xee0
<4>[19964.897717] [<ffffffff8121d40b>] path_openat+0xcb/0x6d0
<4>[19964.897722] [<ffffffff8121e2ad>] do_filp_open+0x4d/0xc0
<4>[19964.897726] [<ffffffff812178db>] ? getname_flags+0x4b/0x180
<4>[19964.897731] [<ffffffff8122b01e>] ? __alloc_fd+0x7e/0x120
<4>[19964.897735] [<ffffffff8120b61b>] do_sys_open+0x13b/0x250
<4>[19964.897738] [<ffffffff8120b74e>] SyS_open+0x1e/0x20
<4>[19964.897743] [<ffffffff81746ae9>] system_call_fastpath+0x16/0x1b
<4>[19965.026562] [<ffffffff8173f929>] dump_stack+0x45/0x56
<4>[19965.026569] [<ffffffffa04aa094>] c0087_write+0x24/0x100 [usb_com_1p_driver]
<4>[19965.026575] [<ffffffff81567890>] serial_write+0x50/0xc0
<4>[19965.026581] [<ffffffff814584e5>] n_tty_write+0x495/0x560
<4>[19965.026586] [<ffffffff810c2850>] ? wake_up_state+0x20/0x20
<4>[19965.026590] [<ffffffff81454a04>] tty_write+0x174/0x300
<4>[19965.026594] [<ffffffff81458050>] ? process_echoes+0x70/0x70
<4>[19965.026599] [<ffffffff8120c597>] vfs_write+0xb7/0x1f0
<4>[19965.026603] [<ffffffff8120d1c5>] SyS_write+0x55/0xd0
<4>[19965.026608] [<ffffffff81746ae9>] system_call_fastpath+0x16/0x1b
第二次打开()并写入()。内核两次写入“7e 0 78 f0 7e”。
<4>[19977.011908] Call Trace:
<4>[19977.011918] [<ffffffff8173f929>] dump_stack+0x45/0x56
<4>[19977.011925] [<ffffffffa04aa1ef>] c0087_open+0x2f/0x160 [usb_com_1p_driver]
<4>[19977.011930] [<ffffffff81744bb2>] ? down_write+0x12/0x40
<4>[19977.011936] [<ffffffff81566f75>] serial_port_activate+0x65/0x90
<4>[19977.011941] [<ffffffff8145e864>] ? tty_port_tty_set+0x64/0xa0
<4>[19977.011945] [<ffffffff8145edf9>] tty_port_open+0x89/0xe0
<4>[19977.011949] [<ffffffff81567bf3>] serial_open+0x33/0x70
<4>[19977.011952] [<ffffffff814560eb>] tty_open+0x17b/0x700
<4>[19977.011958] [<ffffffff81211017>] chrdev_open+0xb7/0x1a0
<4>[19977.011961] [<ffffffff81210f60>] ? cdev_put+0x30/0x30
<4>[19977.011965] [<ffffffff81209832>] do_dentry_open+0x1d2/0x320
<4>[19977.011968] [<ffffffff81209b61>] finish_open+0x31/0x50
<4>[19977.011972] [<ffffffff8121cd7c>] do_last+0xc0c/0x11d0
<4>[19977.011975] [<ffffffff81217bd8>] ? inode_permission+0x18/0x50
<4>[19977.011979] [<ffffffff812180e9>] ? link_path_walk+0x99/0xee0
<4>[19977.011983] [<ffffffff8121d40b>] path_openat+0xcb/0x6d0
<4>[19977.011986] [<ffffffff81455de0>] ? tty_release+0x4c0/0x650
<4>[19977.011990] [<ffffffff8121e2ad>] do_filp_open+0x4d/0xc0
<4>[19977.011993] [<ffffffff812178db>] ? getname_flags+0x4b/0x180
<4>[19977.011998] [<ffffffff8122b01e>] ? __alloc_fd+0x7e/0x120
<4>[19977.012002] [<ffffffff8120b61b>] do_sys_open+0x13b/0x250
<4>[19977.012025] [<ffffffff8120b74e>] SyS_open+0x1e/0x20
<4>[19977.012031] [<ffffffff81746ae9>] system_call_fastpath+0x16/0x1b
<4>[19977.026758] [<ffffffff8173f929>] dump_stack+0x45/0x56
<4>[19977.026766] [<ffffffffa04aa094>] c0087_write+0x24/0x100 [usb_com_1p_driver]
<4>[19977.026772] [<ffffffff81567890>] serial_write+0x50/0xc0
<4>[19977.026777] [<ffffffff814584e5>] n_tty_write+0x495/0x560
<4>[19977.026782] [<ffffffff810c2850>] ? wake_up_state+0x20/0x20
<4>[19977.026786] [<ffffffff81454a04>] tty_write+0x174/0x300
<4>[19977.026789] [<ffffffff81458050>] ? process_echoes+0x70/0x70
<4>[19977.026794] [<ffffffff8120c597>] vfs_write+0xb7/0x1f0
<4>[19977.026797] [<ffffffff8120d1c5>] SyS_write+0x55/0xd0
<4>[19977.026802] [<ffffffff81746ae9>] system_call_fastpath+0x16/0x1b
有人知道这里发生了什么吗?
谢谢!
答案 0 :(得分:0)
在Ubuntu上,以下命令解决了这个问题:
sudo stop modemmanager
您可以通过以下方式重新开始:
sudo start modemmanager