4 Replies Latest reply on Feb 12, 2016 4:58 PM by CMata_Intel

    WARNING: at drivers/i2c/busses/i2c-designware-core.c:1236 i2c_dw_xfer+0x327/0x5c0()

    JulienP

      Hi,

       

      I came across a bug in I2C on Edison. I found this thread, which is similar, but it does not contain much information.

      Re: i2c_dw_handle_tx_abort after update Edison Firmware

       

      It perturbates my program, I get  [Error: I2c write failed].

      dmesg says:

       

      [14198.319240] WARNING: at drivers/i2c/busses/i2c-designware-core.c:1236 i2c_dw_xfer+0x327/0x5c0()

      [14198.319257] Device: i2c-designware-pci

      controller timed out

      [14198.319273] Modules linked in: can_j1939 can mcp251x can_dev usb_f_acm u_serial g_multi libcomposite bcm4334x(O) bcm_bt_lpm

      [14198.319359] CPU: 1 PID: 9731 Comm: node Tainted: G           O 3.10.17-poky-edison+ #37

      [14198.319374] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 466 2014.06.23:19.20.05

      [14198.319388] c1a6c194 f5507e3c f5507e04 c1853ade f5507e2c c124096e c1a6c170 f5507e58

      [14198.319445] 000004d4 c1632db7 c1632db7 f677b800 f5d6d7e0 f677b824 f5507e44 c12409c3

      [14198.319499] 00000009 f5507e3c c1a6c170 f5507e58 f5507e7c c1632db7 c1a6c194 000004d4

      [14198.319554] Call Trace:

      [14198.319587] [<c1853ade>] dump_stack+0x16/0x18

      [14198.319620] [<c124096e>] warn_slowpath_common+0x5e/0x80

      [14198.319647] [<c1632db7>] ? i2c_dw_xfer+0x327/0x5c0

      [14198.319672] [<c1632db7>] ? i2c_dw_xfer+0x327/0x5c0

      [14198.319700] [<c12409c3>] warn_slowpath_fmt+0x33/0x40

      [14198.319727] [<c1632db7>] i2c_dw_xfer+0x327/0x5c0

      [14198.319754] [<c185c745>] ? sub_preempt_count+0x95/0xf0

      [14198.319780] [<c162cdf5>] __i2c_transfer+0x55/0x70

      [14198.319806] [<c162dc1d>] i2c_transfer+0x4d/0xb0

      [14198.319834] [<c1305f3d>] ? memdup_user+0x2d/0x70

      [14198.319860] [<c162ffbf>] i2cdev_ioctl_rdrw.isra.7+0x10f/0x200

      [14198.319888] [<c16301c2>] i2cdev_ioctl+0x112/0x200

      [14198.319914] [<c133f747>] ? fget_light+0x97/0xd0

      [14198.319940] [<c16300b0>] ? i2cdev_ioctl_rdrw.isra.7+0x200/0x200

      [14198.319966] [<c13369d6>] do_vfs_ioctl+0x306/0x550

      [14198.319995] [<c16a6047>] ? __sys_recvmsg+0x57/0x70

      [14198.320026] [<c128b3a0>] ? ktime_get_ts+0x40/0x140

      [14198.320052] [<c133f747>] ? fget_light+0x97/0xd0

      [14198.320077] [<c1336c80>] SyS_ioctl+0x60/0x90

      [14198.320106] [<c18593f8>] syscall_call+0x7/0xb

      [14198.320136] [<c1850000>] ? profile_cpu_callback+0x87/0x1b2

      [14198.320154] ---[ end trace 99ad7bc014ee8320 ]---

      [14198.320175] i2c-designware-pci 0000:00:08.0: ===== REGISTER DUMP (i2c) =====

      [14198.320270] i2c-designware-pci 0000:00:08.0: DW_IC_CON:               0x65

      [14198.320342] i2c-designware-pci 0000:00:08.0: DW_IC_TAR:               0x29

      [14198.320411] i2c-designware-pci 0000:00:08.0: DW_IC_SS_SCL_HCNT:       0x2f8

      [14198.320480] i2c-designware-pci 0000:00:08.0: DW_IC_SS_SCL_LCNT:       0x37b

      [14198.320549] i2c-designware-pci 0000:00:08.0: DW_IC_FS_SCL_HCNT:       0x87

      [14198.320617] i2c-designware-pci 0000:00:08.0: DW_IC_FS_SCL_LCNT:       0x10a

      [14198.320686] i2c-designware-pci 0000:00:08.0: DW_IC_INTR_STAT:         0x0

      [14198.320754] i2c-designware-pci 0000:00:08.0: DW_IC_INTR_MASK:         0x246

      [14198.320822] i2c-designware-pci 0000:00:08.0: DW_IC_RAW_INTR_STAT:     0x510

      [14198.320891] i2c-designware-pci 0000:00:08.0: DW_IC_RX_TL:             0x20

      [14198.320959] i2c-designware-pci 0000:00:08.0: DW_IC_TX_TL:             0x20

      [14198.321028] i2c-designware-pci 0000:00:08.0: DW_IC_ENABLE:            0x1

      [14198.321095] i2c-designware-pci 0000:00:08.0: DW_IC_STATUS:            0xe

      [14198.321163] i2c-designware-pci 0000:00:08.0: DW_IC_TXFLR:             0x0

      [14198.321230] i2c-designware-pci 0000:00:08.0: DW_IC_RXFLR:             0x6

      [14198.321297] i2c-designware-pci 0000:00:08.0: DW_IC_TX_ABRT_SOURCE:    0x0

      [14198.321365] i2c-designware-pci 0000:00:08.0: DW_IC_DATA_CMD:          0x42

      [14198.321432] i2c-designware-pci 0000:00:08.0: ===============================

      [14198.321496] sending NMI to all CPUs:

      [14198.321519] NMI backtrace for cpu 1

      [14198.321531] CPU: 1 PID: 9731 Comm: node Tainted: G        W  O 3.10.17-poky-edison+ #37

      [14198.321536] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 466 2014.06.23:19.20.05

      [14198.321543] task: f572bd30 ti: f5506000 task.ti: f5506000

      [14198.321552] EIP: 0060:[<c1222594>] EFLAGS: 00200206 CPU: 1

      [14198.321565] EIP is at arch_trigger_all_cpu_backtrace+0x64/0x70

      [14198.321573] EAX: 00000000 EBX: 00002710 ECX: c1adad00 EDX: 00000c00

      [14198.321580] ESI: f5d6d7e0 EDI: f677b824 EBP: f5507e44 ESP: f5507e3c

      [14198.321586] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068

      [14198.321593] CR0: 8005003b CR2: 4ac15000 CR3: 35f80000 CR4: 001007f0

      [14198.321599] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000

      [14198.321604] DR6: ffff0ff0 DR7: 00000400

      [14198.321606] Stack:

      [14198.321630] c19fbe04 f677b800 f5507e7c c163301f f64e1064 c1a17628 00000042 c1a4bd03

      [14198.321651] c185c745 f5507e6c f677b898 00000002 f5485568 f677b898 00000000 c1b2aec8

      [14198.321672] f5507e9c c162cdf5 0015350c 00000002 f5d6d7e0 f677b898 f5d6d7e0 00000002

      [14198.321675] Call Trace:

      [14198.321693] [<c163301f>] i2c_dw_xfer+0x58f/0x5c0

      [14198.321707] [<c185c745>] ? sub_preempt_count+0x95/0xf0

      [14198.321720] [<c162cdf5>] __i2c_transfer+0x55/0x70

      [14198.321733] [<c162dc1d>] i2c_transfer+0x4d/0xb0

      [14198.321746] [<c1305f3d>] ? memdup_user+0x2d/0x70

      [14198.321760] [<c162ffbf>] i2cdev_ioctl_rdrw.isra.7+0x10f/0x200

      [14198.321773] [<c16301c2>] i2cdev_ioctl+0x112/0x200

      [14198.321785] [<c133f747>] ? fget_light+0x97/0xd0

      [14198.321799] [<c16300b0>] ? i2cdev_ioctl_rdrw.isra.7+0x200/0x200

      [14198.321811] [<c13369d6>] do_vfs_ioctl+0x306/0x550

      [14198.321825] [<c16a6047>] ? __sys_recvmsg+0x57/0x70

      [14198.321840] [<c128b3a0>] ? ktime_get_ts+0x40/0x140

      [14198.321853] [<c133f747>] ? fget_light+0x97/0xd0

      [14198.321865] [<c1336c80>] SyS_ioctl+0x60/0x90

      [14198.321880] [<c18593f8>] syscall_call+0x7/0xb

      [14198.321896] [<c1850000>] ? profile_cpu_callback+0x87/0x1b2

      [14198.322019] Code: e8 bf f5 62 00 8b 15 c0 ac ad c1 b8 02 00 00 00 ff 52 7c eb 0f b8 58 89 41 00 e8 c8 7f 2a 00 83 eb 01 74 09 f6 05 80 00 b6 c1 03 <75> e8 f0 80 25 f4 43 c0 c1 fe eb ab 8b 15 c0 ac ad c1 55 b8 20

      [14198.322028] NMI backtrace for cpu 0

      [14198.322042] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O 3.10.17-poky-edison+ #37

      [14198.322048] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 466 2014.06.23:19.20.05

      [14198.322056] task: c1ad21c0 ti: c1acc000 task.ti: c1acc000

      [14198.322066] EIP: 0060:[<c1511308>] EFLAGS: 00200046 CPU: 0

      [14198.322079] EIP is at intel_idle+0x98/0xf0

      [14198.322086] EAX: 00000000 EBX: 00000002 ECX: 00000001 EDX: 00000000

      [14198.322092] ESI: 00000000 EDI: c1b18a8c EBP: c1acdf5c ESP: c1acdf48

      [14198.322099] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068

      [14198.322106] CR0: 8005003b CR2: b7706000 CR3: 01bfc000 CR4: 001007f0

      [14198.322112] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000

      [14198.322117] DR6: ffff0ff0 DR7: 00000400

      [14198.322119] Stack:

      [14198.322143] 00000001 00000000 f73f3500 c1b18a00 0000004c c1acdf84 c16529fe 00000000

      [14198.322164] 0000000d 82d177b1 00000cea 00000001 00000002 c1b18a00 0000004c c1acdfa8

      [14198.322185] c1652b55 00000000 c1b18a00 00000000 f73f3500 00000002 00099800 c1acc000

      [14198.322188] Call Trace:

      [14198.322209] [<c16529fe>] cpuidle_enter_state+0x2e/0xe0

      [14198.322225] [<c1652b55>] cpuidle_idle_call+0xa5/0x220

      [14198.322242] [<c120866d>] arch_cpu_idle+0xd/0x30

      [14198.322255] [<c12891af>] cpu_startup_entry+0x6f/0x230

      [14198.322272] [<c1844af1>] rest_init+0x71/0x80

      [14198.322287] [<c1b6790b>] start_kernel+0x2e2/0x2e7

      [14198.322299] [<c1b672ac>] i386_start_kernel+0x82/0x86

      [14198.322422] Code: 50 08 83 e2 08 75 39 31 d2 83 c0 08 89 d1 0f 01 c8 0f ae f0 89 f6 89 e0 25 00 e0 ff ff 8b 40 08 a8 08 75 07 b1 01 89 f0 0f 01 c9 <85> 1d f8 89 b1 c1 75 0d 8d 55 f0 b8 05 00 00 00 e8 63 01 d8 ff

      [14198.323030] i2c-1: try to abort xfer, scl_gpio 19, sda_gpio 20

      [14198.324607] i2c-1: scl_gpio val 1, sda_gpio val 0

      [14198.324685] i2c-1: toggle begin

      [14198.332696] i2c-1: toggle SCL loop 0

      [14198.332755] i2c-1: scl_gpio val 0, sda_gpio val 1

      [14198.333089] i2c-1: toggle SCL loop 1

      [14198.333144] i2c-1: scl_gpio val 0, sda_gpio val 1

      [14198.333327] i2c-1: toggle SCL loop 2

      [14198.333381] i2c-1: scl_gpio val 0, sda_gpio val 1

      [14198.333562] i2c-1: toggle SCL loop 3

      [14198.333616] i2c-1: scl_gpio val 0, sda_gpio val 1

      [14198.333800] i2c-1: toggle SCL loop 4

      [14198.333853] i2c-1: scl_gpio val 0, sda_gpio val 1

      [14198.334036] i2c-1: toggle SCL loop 5

      [14198.334091] i2c-1: scl_gpio val 0, sda_gpio val 1

      [14198.334273] i2c-1: toggle SCL loop 6

      [14198.334327] i2c-1: scl_gpio val 0, sda_gpio val 1

      [14198.335213] i2c-1: toggle SCL loop 7

      [14198.335270] i2c-1: scl_gpio val 0, sda_gpio val 1

      [14198.335449] i2c-1: toggle SCL loop 8

      [14198.335494] i2c-1: toggle end


      uname -a says:

       

      Linux anemobox 3.10.17-poky-edison+ #37 SMP PREEMPT Thu Jan 21 11:06:24 CET 2016 i686 GNU/Linux

      The sources of the kernel are there jpilet/edison-linux at edison-3.10.17-anemo... · GitHub


      Any suggestion?