AnsweredAssumed Answered

Bugs in adis16400 linux iio driver (using a adis16448)

Question asked by Korbinian on May 7, 2015
Latest reply on May 18, 2015 by Korbinian

Hallo,

 

Buffered polling an adis16448 using the adis16400 linux iio driver via the /dev/iio:device0 interface revealed some bugs in the driver:

- trying to enable the buffer with only time_stamp channel active (result: invalid argument), activating a further channel and reenabling the buffer results in a kernel oops (dmesg attached).

- data is only valid if the timestamp channel is activated

- reading /sys/bus/iio/devices/iio:device0/in_pressure_scale results in: "cat: in_pressure_scale: Invalid argument"

- in_timestamp_index is 17, shouldn't it be 12? (the way ..._index is used it gives actually the field order and not the index)

- diag_stat is not listed in scan_elements even though it is transferred in burst mode

 

Is my assumption right, that the first 16bit in the data buffer correspond to diag_stat?

 

Best reagards,

Korbinian

 

Unable to handle kernel NULL pointer dereference at virtual address 00000000

[11380.961189] pgd = c0004000

[11380.961198] [00000000] *pgd=00000000

[11380.961208] Internal error: Oops: 17 [#1] PREEMPT THUMB2

[11380.961239] Modules linked in: usb_f_eem g_ether usb_f_rndis u_ether libcomposite binfmt_misc omap_sham omap_aes spidev adis16400 adis_lib industrialio_triggered_buffer kfifo_buf industrialio spi_omap2_mcspi evdev

[11380.961251] CPU: 0 PID: 242 Comm: spi1 Tainted: G        W      3.18.5-rt2-bone1 #4

[11380.961257] task: de5fce00 ti: de770000 task.ti: de770000

[11380.961274] PC is at complete+0x16/0x58

[11380.961278] LR is at complete+0x17/0x58

[11380.961284] pc : [<c00518d2>]    lr : [<c00518d3>]    psr: 600500b3

[11380.961284] sp : de771df8  ip : de770044  fp : de76c2b0

[11380.961287] r10: 00000008  r9 : de679380  r8 : de55f2e8

[11380.961291] r7 : de76c2b0  r6 : de76c244  r5 : 60050013  r4 : 00000000

[11380.961294] r3 : de5fce00  r2 : 00000000  r1 : 00000001  r0 : 00000001

[11380.961301] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA Thumb  Segment kernel

[11380.961305] Control: 50c5387d  Table: 9cb6c019  DAC: 00000015

[11380.961309] Process spi1 (pid: 242, stack limit = 0xde770240)

[11380.961313] Stack: (0xde771df8 to 0xde772000)

[11380.961319] 1de0:                                                       00000000 de76c000

[11380.961326] 1e00: de55f31c c04484f1 00000001 de60d000 c0016e11 de76c2b0 de55f2e8 bf807e87

[11380.961333] 1e20: 00000000 00000000 00000000 c0023c29 de771e4c de76c2b0 de55f31c 00000000

[11380.961340] 1e40: 00000000 00000000 de6bacd0 de6bacd0 00000001 dcbcab80 00000000 de76c000

[11380.961347] 1e60: de6bacd0 301113ff 00000020 c0a7e2c0 de679380 de76c000 00000002 00000000

[11380.961353] 1e80: 00000000 9cbcab80 00000020 00000000 4803013c 48030138 00000001 00000001

[11380.961360] 1ea0: 00000020 00000020 00000000 00000000 00000000 de1cc810 0000000d c03f842d

[11380.961367] 1ec0: de1cc810 c0606d43 c0a29158 c03f9105 de771ed8 00000000 4803013c 48030138

[11380.961374] 1ee0: 00000001 00000001 00000020 00000020 00000000 00000000 00000000 de76c000

[11380.961380] 1f00: de76c234 de55f31c 00000001 00000001 c0b18b24 de770010 00000000 c0448bff

[11380.961387] 1f20: c0b18b24 de76c20c de771f40 de76c234 c0b18b24 de76c20c de770000 00000001

[11380.961394] 1f40: c0b18b24 de770010 00000000 c0045c93 00000000 de758d80 de76c20c c0045c55

[11380.961401] 1f60: 00000000 00000000 00000000 c0045dc5 6e62b154 00000000 46206e21 de76c20c

[11380.961408] 1f80: 00000000 de771f84 de771f84 00000000 de771f90 de771f90 00000000 de758d80

[11380.961415] 1fa0: c0045d45 00000000 00000000 c000d8b9 00000000 00000000 00000000 00000000

[11380.961421] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[11380.961428] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 6e2331f0 f1a3429e

[11380.961464] [<c00518d2>] (complete) from [<c04484f1>] (spi_finalize_current_message+0x81/0x124)

[11380.961492] [<c04484f1>] (spi_finalize_current_message) from [<bf807e87>] (omap2_mcspi_transfer_one_message+0x4ce/0xe08 [spi_omap2_mcspi])

[11380.961510] [<bf807e87>] (omap2_mcspi_transfer_one_message [spi_omap2_mcspi]) from [<c0448bff>] (spi_pump_messages+0x2bb/0x448)

[11380.961524] [<c0448bff>] (spi_pump_messages) from [<c0045c93>] (kthread_worker_fn+0x3f/0xf0)

[11380.961532] [<c0045c93>] (kthread_worker_fn) from [<c0045dc5>] (kthread+0x81/0x94)

[11380.961548] [<c0045dc5>] (kthread) from [<c000d8b9>] (ret_from_fork+0x11/0x1c)

[11380.961557] Code: b672 2001 f7f8 fef7 (6823) 2201

[11381.294711] ---[ end trace 0000000000000003 ]---

Outcomes