Comedi定制驱动程序

时间:2018-07-03 10:27:17

标签: linux-kernel usb

我正在尝试安装从以下位置下载的dt9837 comedi驱动程序: [https://github.com/gruo/dt9837][1]

我按照安装说明正确地编译并安装了comedi项目。

安装后,cat / proc / comedi 的输出:

```

comedi version 0.7.76.1
format string: "%2d: %-20s %-20s %4d", i, driver_name, board_name, n_subdevices
no devices
dt9837:
 dt9837

```

dmesg(重新连接USB时): ```

[ 1015.138719] dt9837 1-1.1:1.0: USB DT9837 #-1 now disconnected
[ 1018.022412] usb 1-1.2: new high-speed USB device number 5 using ehci-pci
[ 1018.131013] usb 1-1.2: New USB device found, idVendor=0867, idProduct=9839
[ 1018.131017] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 101

8.131699] dt9837 1-1.2:1.0:USB DT9837(6c6f.6e00.625f)#0x76007365 ```

要触发附加功能,我执行comedi_config命令(comedi_config / dev / comedi dt9837),并在dmesg下得到以下错误:

```

[  441.604343] BUG: unable to handle kernel 
[  441.608354] NULL pointer dereference at 0000000000000018
[  441.612368] IP: [<ffffffffc00ea229>] dt9837_attach+0xc9/0x1b3 [dt9837]
[  441.618903] PGD 0 

[  441.622233] Oops: 0002 [#1] SMP
[  441.625368] Modules linked in: dt9837(O) comedi(O) ext4 crc16 jbd2 crc32c_generic fscrypto ecb mbcache sd_mod crc32c_intel aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd i2c_i801 ehci_pci ehci_hcd i2c_smbus usbcore usb_common ahci libahci igb libata i2c_algo_bit dca ptp pps_core scsi_mod fan thermal
[  441.654034] CPU: 2 PID: 7809 Comm: comedi_config Tainted: G           O    4.9.0-6-amd64 #1 Debian 4.9.82-1+deb9u3
[  441.664367] Hardware name: Lanner Electronics LEB-6032/Aptio CRB, BIOS 5.6.5 06/24/2016
[  441.672358] task: ffff8b7f30afc100 task.stack: ffffab7941724000
[  441.678269] RIP: 0010:[<ffffffffc00ea229>]  [<ffffffffc00ea229>] dt9837_attach+0xc9/0x1b3 [dt9837]
[  441.687231] RSP: 0018:ffffab7941727c60  EFLAGS: 00010286
[  441.692533] RAX: 0000000000000000 RBX: ffff8b7f33236300 RCX: 000000000000007c
[  441.699656] RDX: 0000000000000000 RSI: ffffffffc00eb108 RDI: ffffffffc00eb040
[  441.706779] RBP: ffffab7941727cc4 R08: 0000000000000044 R09: 0000000000000044
[  441.713901] R10: 0000000000000541 R11: ffffffff962b7944 R12: 00000000fffffff4
[  441.721024] R13: ffffab7941727cc4 R14: ffffffffc015d1e8 R15: ffff8b7f33236300
[  441.728150] FS:  00007f950aea4700(0000) GS:ffff8b7f3fd00000(0000) knlGS:0000000000000000
[  441.736229] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  441.741966] CR2: 0000000000000018 CR3: 000000027439a000 CR4: 0000000000100670
[  441.749090] Stack:
[  441.751099]  ffff8b7f33236300 ffff8b7f33236300 0000000000000000 ffffffffc0159468
[  441.758534]  ffff8b7f33236300 00007ffcc0bf2f70 ffff8b7f33236300 00007ffcc0bf2f70
[  441.765969]  0000000040946400 00007ffcc0bf2f70 ffff8b7f33236300 ffffffffc01541bc
[  441.773404] Call Trace:
[  441.775854]  [<ffffffffc0159468>] ? comedi_device_attach+0x1b8/0x510 [comedi]
[  441.782981]  [<ffffffffc01541bc>] ? do_devconfig_ioctl+0x15c/0x240 [comedi]
[  441.789936]  [<ffffffffc0156838>] ? comedi_unlocked_ioctl+0x2d8/0x13c0 [comedi]
[  441.797240]  [<ffffffff956018da>] ? __check_object_size+0xfa/0x1d8
[  441.803412]  [<ffffffff9575c678>] ? strncpy_from_user+0x48/0x160
[  441.809411]  [<ffffffff9560ad8d>] ? cp_new_stat+0x14d/0x180
[  441.814978]  [<ffffffff95619db2>] ? do_vfs_ioctl+0xa2/0x620
[  441.820542]  [<ffffffff9560adf9>] ? SYSC_newstat+0x39/0x60
[  441.826019]  [<ffffffff9561a3a4>] ? SyS_ioctl+0x74/0x80
[  441.831241]  [<ffffffff95403b7f>] ? do_syscall_64+0x8f/0xf0
[  441.836807]  [<ffffffff95a113b8>] ? entry_SYSCALL_64_after_swapgs+0x42/0xb0
[  441.843758] Code: 0e c0 48 c7 c7 5e b0 0e c0 e8 8d 30 49 d5 48 8b 43 10 8b 55 14 b9 7c 00 00 00 48 c7 c6 08 b1 0e c0 48 c7 c7 40 b0 0e c0 48 8b 00 <89> 50 18 48 c7 c2 10 b2 0e c0 e8 61 30 49 d5 c7 43 7c 01 00 00 
[  441.863430] RIP  [<ffffffffc00ea229>] dt9837_attach+0xc9/0x1b3 [dt9837]
[  441.870046]  RSP <ffffab7941727c60>
[  441.873527] CR2: 0000000000000018
[  441.876887] ---[ end trace c2804983389c2a10 ]---

```

这里有帮助吗? 谢谢进阶

0 个答案:

没有答案