Cascoda / ca8210-linux

Linux kernel driver for direct SPI communication with Cascoda's CA-8210 IEEE 802.15.4 transceiver
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Kernel panic seen in 4.4 while running ifconfig #10

Closed tgillbe closed 7 years ago

tgillbe commented 7 years ago

Using the latest version of openwrt for the Ci40 (ci40-openwrt-v1.0.1) and the latest driver (24069b2f447e0969aa22cbcece1a8399448a6aba), running ifconfig will cause the kernel to panic. This doesn't happen with ci40-openwrt-v1.0.1 and ca8210 v1.2.0.

Logs are as follows:

U-Boot SPL 2015.10-v1.0.4 (Jan 06 2017 - 13:44:31)

U-Boot 2015.10-v1.0.4 (Jan 06 2017 - 13:44:31 +0000), Build: jenkins-CreatorDev-u-boot-2015.10-9

MIPS(interAptiv): IMG Pistachio 546MHz.
Model: IMG Marduk
DRAM:  256 MiB
NAND:  512 MiB
MMC:   Synopsys Mobile storage: 0
SF: Detected W25Q16CL with page size 256 Bytes, erase size 4 KiB, total 2 MiB
In:    uart@18101500
Out:   uart@18101500
Err:   uart@18101500
TPM:   1.2 TPM (open, chip type slb9645tt device-id 0x1a)
Net:   eth0: ethernet@18140000
Hit any key to stop autoboot:  0
pistachio # run mmcboot
SF: Detected W25Q16CL with page size 256 Bytes, erase size 4 KiB, total 2 MiB
Device: Synopsys Mobile storage
Manufacturer ID: 2
OEM: 544d
Name: SA04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
switch to partitions #0, OK
mmc0(part 0) is current device
3080872 bytes read in 106 ms (27.7 MiB/s)
## Loading kernel from FIT Image at 0e000000 ...
   Using 'config@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  MIPS OpenWrt Linux-4.4.14
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x0e0000e4
     Data Size:    3055505 Bytes = 2.9 MiB
     Architecture: MIPS
     OS:           Linux
     Load Address: 0x80400000
     Entry Point:  0x80400000
     Hash algo:    crc32
     Hash value:   1542f0da
     Hash algo:    sha1
     Hash value:   8a1da8b66995274632090a73c49cfc36355bec69
## Loading fdt from FIT Image at 0e000000 ...
   Using 'config@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  MIPS OpenWrt marduk_ca8210 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x0e2ea1b4
     Data Size:    24010 Bytes = 23.4 KiB
     Architecture: MIPS
     Hash algo:    crc32
     Hash value:   8455f297
     Hash algo:    sha1
     Hash value:   b5abd3da249268cb588fd99c5e183c782600b7ae
   Booting using the fdt blob at 0xe2ea1b4
   Uncompressing Kernel Image ... OK
SF: Detected W25Q16CL with page size 256 Bytes, erase size 4 KiB, total 2 MiB
[    0.055842] console [ttyS1] enabled
[    0.059733] bootconsole [early0] disabled
[    0.066257] lkdtm: No crash points registered, enable through debugfs
[    0.073902] ATU Clock Module Loaded
[    0.085976] m25p80 spi1.0: s25fl016k (2048 Kbytes)
[    0.091452] 4 cmdlinepart partitions found on MTD device spi-nor
[    0.098142] Creating 4 MTD partitions on "spi-nor":
[    0.103616] 0x000000000000-0x000000180000 : "uboot"
[    0.111161] 0x000000180000-0x000000182000 : "data-ro"
[    0.118450] 0x000000182000-0x000000184000 : "uEnv"
[    0.125503] 0x000000184000-0x000000200000 : "data-rw"
[    0.133842] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0xb4
[    0.140967] nand: Gigadevice SPI NAND 512MiB 3,3V
[    0.146211] nand: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 256
[    0.156586] Bad block table found at page 130944, version 0x01
[    0.165168] Bad block table found at page 130880, version 0x01
[    0.172453] nand_read_bbt: bad block at 0x00000cbc0000
[    0.178207] nand_read_bbt: bad block at 0x000018000000
[    0.183958] nand_read_bbt: bad block at 0x000018040000
[    0.189704] nand_read_bbt: bad block at 0x00001ffc0000
[    0.195552] 2 cmdlinepart partitions found on MTD device spi-nand
[    0.202360] Creating 2 MTD partitions on "spi-nand":
[    0.207901] 0x000000000000-0x000010000000 : "firmware0"
[    0.215860] 0x000010000000-0x000020000000 : "firmware1"
[    0.226834] stmmaceth 18140000.ethernet: no reset control found
[    0.233595] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    0.239209]  Ring mode enabled
[    0.242636]  DMA HW capability register supported
[    0.247682]  Normal descriptors
[    0.251396]  RX Checksum Offload Engine supported (type 2)
[    0.257500]  TX Checksum insertion supported
[    0.262269]  Wake-Up On Lan supported
[    0.266429]  Enable RX Mitigation via HW Watchdog Timer
[    0.275082] libphy: stmmac: probed
[    0.278888] eth0: PHY ID 00221561 at 0 IRQ POLL (stmmac-0:00) active
[    0.286684] 18120000.usb supply vusb_d not found, using dummy regulator
[    0.294233] 18120000.usb supply vusb_a not found, using dummy regulator
[    0.640117] dwc2 18120000.usb: EPs: 9, dedicated fifos, 4664 entries in SPRAM
[    1.170636] dwc2 18120000.usb: DWC OTG Controller
[    1.175934] dwc2 18120000.usb: new USB bus registered, assigned bus number 1
[    1.183910] dwc2 18120000.usb: irq 56, io mem 0x00000000
[    1.190260] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.197827] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.205909] usb usb1: Product: DWC OTG Controller
[    1.211179] usb usb1: Manufacturer: Linux 4.4.14 dwc2_hsotg
[    1.217378] usb usb1: SerialNumber: 18120000.usb
[    1.223575] hub 1-0:1.0: USB hub found
[    1.227824] hub 1-0:1.0: 1 port detected
[    1.233353] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.240958] usbcore: registered new interface driver usb-storage
[    1.249522] rtc-pistachio 18102000.timer-counter: rtc core: registered rtc-pistachio as rtc0
[    1.261288] tpm_i2c_infineon 0-0020: 1.2 TPM (device-id 0x1A)
[    1.384504] tpm_i2c_infineon 0-0020: TPM is disabled/deactivated (0x7)
[    1.394420] pps_ldisc: PPS line discipline registered
[    1.400686] imgpdc-wdt 18102100.watchdog: watchdog module last reset due to hard reset
[    1.410904] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: dm-devel@redhat.com
[    1.421776] Synopsys Designware Multimedia Card Interface Driver
[    1.429335] dw_mmc 18142000.mmc: IDMAC supports 32-bit address mode.
[    1.436514] dw_mmc 18142000.mmc: Using internal DMA controller.
[    1.443157] dw_mmc 18142000.mmc: Version ID is 270a
[    1.448688] dw_mmc 18142000.mmc: DW MMC controller at irq 46,32 bit host data width,32 deep fifo
[    1.458602] dw_mmc 18142000.mmc: No vmmc regulator found
[    1.464543] dw_mmc 18142000.mmc: No vqmmc regulator found
[    1.490131] mmc_host mmc0: Bus speed (slot 0) = 87500000Hz (slot req 400000Hz, actual 397727HZ div = 110)
[    1.520400] dw_mmc 18142000.mmc: 1 slots initialized
[    1.527995] img-hash-accelerator 18149600.hash: Img MD5/SHA1/SHA224/SHA256 Hardware accelerator initialized
[    1.539664] hidraw: raw HID events driver (C) Jiri Kosina
[    1.547950] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    1.560277] NET: Registered protocol family 10
[    1.567724] NET: Registered protocol family 17
[    1.569740] mmc_host mmc0: Bus speed (slot 0) = 87500000Hz (slot req 50000000Hz, actual 43750000HZ div = 1)
[    1.569778] mmc0: new high speed SDHC card at address 1234
[    1.571084] mmcblk0: mmc0:1234 SA04G 3.64 GiB
[    1.573621]  mmcblk0: p1
[    1.597890] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.612055] 8021q: 802.1Q VLAN Support v1.8
[    1.622837] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[    1.631137] rtc-pistachio 18102000.timer-counter: setting system clock to 1970-01-31 05:22:21 UTC (2611341)
[    1.691845] internal_dac_supply: disabling
[    1.699951] EXT4-fs (mmcblk0p1): couldn't mount as ext3 due to feature incompatibilities
[    1.710967] EXT4-fs (mmcblk0p1): couldn't mount as ext2 due to feature incompatibilities
[    1.757228] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    1.766648] VFS: Mounted root (ext4 filesystem) readonly on device 179:1.
[    1.775601] Freeing unused kernel memory: 256K (80a70000 - 80ab0000)
[    2.083490] init: Console is alive
[    2.087679] init: - watchdog -
[    2.709848] init: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    5.951801] mount_root: mounting /dev/root
[    6.083325] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
[    6.100912] procd: - early -
[    6.104293] procd: - watchdog -
[    6.738116] procd: - ubus -
[    6.796306] random: ubusd urandom read with 119 bits of entropy available
[    6.805882] procd: - init -
Please press Enter to activate this console.
[    6.993901] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    7.013187] i2c /dev entries driver
[    7.051949] NET: Registered protocol family 36
[    7.071078] ca8210 spi0.0: Inserting ca8210
[    7.080981] ca8210 spi0.0: Wakeup indication received, reason:
[    7.087488] ca8210 spi0.0: Transceiver woken up from Power Up / System Reset
[    7.204745] ca8210 spi0.0: Wakeup indication received, reason:
[    7.211331] ca8210 spi0.0: Transceiver woken up from Power Up / System Reset
[    7.220023] random: nonblocking pool is initialized
[    7.239251] ca8210 spi0.0: Switching external clock on
[    7.246740] ca8210 spi0.0: External clock set as clock provider
[    7.347028] Bluetooth: Core ver 2.21
[    7.351450] NET: Registered protocol family 31
[    7.356409] Bluetooth: HCI device and connection manager initialized
[    7.363642] Bluetooth: HCI socket layer initialized
[    7.369085] Bluetooth: L2CAP socket layer initialized
[    7.374862] Bluetooth: SCO socket layer initialized
[    7.382646] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    7.388571] Bluetooth: BNEP filters: protocol multicast
[    7.394575] Bluetooth: BNEP socket layer initialized
[    7.404518] usbcore: registered new interface driver btusb
[    7.412623] Bluetooth: HCI UART driver ver 2.3
[    7.417594] Bluetooth: HCI UART protocol H4 registered
[    7.423409] Bluetooth: HCI UART protocol BCSP registered
[    7.431304] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    7.437944] Bluetooth: HIDP socket layer initialized
[    7.457873] ip_tables: (C) 2000-2006 Netfilter Core Team
[    7.475355] nf_conntrack version 0.5.0 (3866 buckets, 15464 max)
[    7.625396] Register Fractional PLL to ATU Clock
[    7.630837] ATU rate 147456000
[    7.634702] ATU Clock Registered for cycle counter:0x8f1b9648
[    7.649460] Bluetooth: RFCOMM TTY layer initialized
[    7.655203] Bluetooth: RFCOMM socket layer initialized
[    7.661074] Bluetooth: RFCOMM ver 1.11
[    7.691248] xt_time: kernel timezone is -0000
[    7.712416] pistachio-card pistachio_audio_card: snd-soc-dummy-dai <-> 18100d00.spdif-out mapping ok
[    7.725694] pistachio-card pistachio_audio_card: snd-soc-dummy-dai <-> 18100e00.spdif-in mapping ok
[    7.738819] pistachio-card pistachio_audio_card: pistachio_internal_dac <-> 18100c00.parallel-audio-out mapping ok
[    7.753429] pistachio-card pistachio_audio_card: snd-soc-dummy-dai <-> 18100a00.i2s-out mapping ok
[    7.766502] pistachio-card pistachio_audio_card: snd-soc-dummy-dai <-> 18100800.i2s-in mapping ok
[    7.785491] PPP generic driver version 2.4.2
[    7.792175] NET: Registered protocol family 24
[   16.957397] Loading modules backported from Linux version wt-2016-05-12-0-g7a54796
[   16.965936] Backport generated by backports.git backports-20160216-0-ge3c56e4
[   17.108984] hal_init: kmalloc success: 83000000 an phy: 0x3000000 end: 87000000
[   17.117213] bounce_addr: 0x3000000 chunk_start: 0x0
[   17.122667] hal_init: kmalloc success: 0
[   17.128603] MAC ADDR: 00:19:f5:89:1e:bd
[   17.132934] SETUP HT CALLED
[   17.136055] SETUP VHT CALLED
[   17.139262] SETUP HT CALLED
[   17.279294] img/uccp420wlan/MCP_LOADER.ldr is loaded
[   17.392836] img/uccp420wlan/MAC_LOADER.ldr is loaded
[   25.330214] stmmaceth 18140000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

BusyBox v1.24.2 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 DESIGNATED DRIVER (Bleeding Edge, ci40-v1.0.1)
 -----------------------------------------------------
  * 2 oz. Orange Juice         Combine all juices in a
  * 2 oz. Pineapple Juice      tall glass filled with
  * 2 oz. Grapefruit Juice     ice, stir well.
  * 2 oz. Cranberry Juice
 -----------------------------------------------------
root@OpenWrt:/# ifconfig
[  239.980206] INFO: task kworker/2:0:19 blocked for more than 120 seconds.
[  239.987726]       Not tainted 4.4.14 #7
[  239.992102] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  240.000870] kworker/2:0     D 804076fc     0    19      2 0x00100000
[  240.008044] Workqueue: events linkwatch_event
[  240.012937] Stack : 84334f80 8f898d20 00000001 84334f80 8f839900 84334f80 80a696b4 ffffffff
          8f898d20 80a696bc 80a696b8 00000001 80a40000 00010000 00000002 804076fc
          8f8a5dfc 8f898d68 84334f80 00000002 84334f80 80407a2c 00000000 80aa5f80
          00000008 8f898d68 80aa5f80 804093fc 80a3f0c0 80a40000 84334f80 84334f80
          00000000 8f125cb4 8f363d3c 8f898d20 8f83a800 80a696e4 84334b40 00000000
          ...
[  240.052778] Call Trace:
[  240.055629] [<804076fc>] schedule+0x64/0x7c
[  240.060399] [<80407a2c>] schedule_preempt_disabled+0x10/0x1c
[  240.066732] [<804093fc>] __mutex_lock_slowpath+0x140/0x1f0
[  240.072960] [<80827c3c>] linkwatch_event+0x10/0x38
[  240.078345] [<80443928>] process_one_work+0x248/0x3bc
[  240.084081] [<804445cc>] worker_thread+0x31c/0x4b8
[  240.089436] [<804442b0>] worker_thread+0x0/0x4b8
[  240.094649] [<804442b0>] worker_thread+0x0/0x4b8
[  240.099842] [<804495e4>] kthread+0x118/0x124
[  240.104710] [<804494cc>] kthread+0x0/0x124
[  240.109298] [<80400698>] ret_from_kernel_thread+0x14/0x1c
[  240.115364]
[  240.117076] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.4.14 #7
[  240.117090] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.14 #7
[  240.117120] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.14 #7
[  240.117135] task: 8f854ec0 ti: 8f882000 task.ti: 8f882000
[  240.117175] task: 8f8541a0 ti: 8f876000 task.ti: 8f876000
[  240.117189] $ 0   :
[  240.117197] $ 0   :
[  240.117207]  00000000
[  240.117215]  00000000
[  240.117227]  80ab000c
[  240.117234]  80ab0004
[  240.117244]  00000000
[  240.117251]  00000000
[  240.117260]  00000000
[  240.117266]  00000000
[  240.117268]
[  240.117273]
[  240.117286] $ 4   :
[  240.117293] $ 4   :
[  240.117303]  00000000
[  240.117310]  00000000
[  240.117320]  00000000
[  240.117327]  00000000
[  240.117337]  00000000
[  240.117345]  00000000
[  240.117354]  00000000
[  240.117360]  00000000
[  240.117362]
[  240.117367]
[  240.117380] $ 8   :
[  240.117388] $ 8   :
[  240.117400]  80b10000
[  240.117408]  80b10000
[  240.117419]  80ab0000
[  240.117427]  80ab0000
[  240.117439]  036d6162
[  240.117446]  02faf082
[  240.117456]  00000000
[  240.117462]  00000000
[  240.117463]
[  240.117468]
[  240.117481] $12   :
[  240.117489] $12   :
[  240.117499]  00000012
[  240.117506]  00000012
[  240.117518]  00000009
[  240.117525]  8098ad10
[  240.117535]  00000000
[  240.117543]  00000000
[  240.117553]  00000362
[  240.117559]  000002ce
[  240.117561]
[  240.117565]
[  240.117579] $16   :
[  240.117586] $16   :
[  240.117596]  00000000
[  240.117603]  00000000
[  240.117613]  00000000
[  240.117621]  00000000
[  240.117632]  80aa3364
[  240.117641]  80aa3364
[  240.117652]  80aa5528
[  240.117658]  80aa5528
[  240.117660]
[  240.117664]
[  240.117677] $20   :
[  240.117685] $20   :
[  240.117697]  80a3e73c
[  240.117705]  80a3e73c
[  240.117717]  80a3e660
[  240.117725]  80a3e520
[  240.117736]  80a40000
[  240.117744]  80a40000
[  240.117754]  000000a0
[  240.117760]  000000a0
[  240.117762]
[  240.117766]
[  240.117780] $24   :
[  240.117787] $24   :
[  240.117797]  00000000
[  240.117805]  00000000
[  240.117817]  8040feb4
[  240.117824]  8040feb4
[  240.117833]
[  240.117840]
[  240.117849]
[  240.117855]
[  240.117857]
[  240.117862]
[  240.117875] $28   :
[  240.117883] $28   :
[  240.117895]  8f882000
[  240.117903]  8f876000
[  240.117914]  8f883eb0
[  240.117922]  8f877eb0
[  240.117932]  00000001
[  240.117940]  00000001
[  240.117951]  80466ed0
[  240.117957]  80466ed0
[  240.117959]
[  240.117963]
[  240.117969] Hi    : 00000003
[  240.117979] Hi    : 00000001
[  240.117984] Lo    : 00000000
[  240.117993] Lo    : 00000000
[  240.118039] epc   : 8040fecc r4k_wait_irqoff+0x18/0x20
[  240.118086] epc   : 8040fecc r4k_wait_irqoff+0x18/0x20
[  240.118108] ra    : 80466ed0 cpu_startup_entry+0x150/0x294
[  240.118141] ra    : 80466ed0 cpu_startup_entry+0x150/0x294
[  240.118158] Status: 1100fc03
[  240.118164] Status: 1100fc03
[  240.118171] KERNEL
[  240.118177] KERNEL
[  240.118184] EXL
[  240.118190] EXL
[  240.118196] IE
[  240.118202] IE
[  240.118204]
[  240.118209]
[  240.118217] Cause : 90800400 (ExcCode 00)
[  240.118233] Cause : 90800400 (ExcCode 00)
[  240.118243] PrId  : 0001a120 (MIPS interAptiv (multi))
[  240.118259] PrId  : 0001a120 (MIPS interAptiv (multi))
[  240.118273] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.14 #7
[  240.118446] Stack : 00000000 00000000 80ab68da 00000033 00000000 00000000 80a40000 80af0000
[  240.118446]    8f8552b8 80a42543 80981c28 00000003 00000000 80ab3650 80987268 000000a0
[  240.118446]    80a40000 8046f504 00000000 00000000 00000000 00000000 8098709c 8f883c1c
[  240.118446]    00000000 8046d218 80a40000 80af0000 804100e8 80a40000 00000000 00883c1c
[  240.118446]    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  240.118446]    ...
[  240.118450] Call Trace:
[  240.118473] [<80413f70>] show_stack+0x50/0x84
[  240.118525] [<806442b8>] dump_stack+0xd4/0x10c
[  240.118587] [<804967f4>] flush_smp_call_function_queue+0x11c/0x1bc
[  240.118622] [<80674398>] ipi_call_interrupt+0x10/0x20
[  240.118679] [<80470bc4>] handle_irq_event_percpu+0x68/0x1a4
[  240.118706] [<80475070>] handle_percpu_irq+0x88/0xb8
[  240.118727] [<804702c0>] generic_handle_irq+0x28/0x38
[  240.118746] [<806742d0>] gic_handle_shared_int+0x1e0/0x238
[  240.118767] [<804702c0>] generic_handle_irq+0x28/0x38
[  240.118791] [<8040ffc4>] do_IRQ+0x1c/0x2c
[  240.118810] [<80672a24>] plat_irq_dispatch+0x98/0xc4
[  240.118815]
[  240.118848] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.14 #7
[  240.119204] Stack : 00000000 00000000 80ab68da 00000033 00000000 00000000 80a40000 80af0000
[  240.119204]    8f854598 80a42543 80981c28 00000001 00000000 80ab3650 80987268 000000a0
[  240.119204]    80a40000 8046f504 00000000 00000000 00000000 00000000 8098709c 8f877c1c
[  240.119204]    00000000 8046d218 80a40000 80af0000 804100e8 80a40000 00000000 00877c1c
[  240.119204]    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  240.119204]    ...
[  240.119212] Call Trace:
[  240.119245] [<80413f70>] show_stack+0x50/0x84
[  240.119291] [<806442b8>] dump_stack+0xd4/0x10c
[  240.119345] [<804967f4>] flush_smp_call_function_queue+0x11c/0x1bc
[  240.119387] [<80674398>] ipi_call_interrupt+0x10/0x20
[  240.119440] [<80470bc4>] handle_irq_event_percpu+0x68/0x1a4
[  240.119479] [<80475070>] handle_percpu_irq+0x88/0xb8
[  240.119523] [<804702c0>] generic_handle_irq+0x28/0x38
[  240.119562] [<806742d0>] gic_handle_shared_int+0x1e0/0x238
[  240.119606] [<804702c0>] generic_handle_irq+0x28/0x38
[  240.119650] [<8040ffc4>] do_IRQ+0x1c/0x2c
[  240.119687] [<80672a24>] plat_irq_dispatch+0x98/0xc4
[  240.119698]
[  240.691129] task: 8f854830 ti: 8f880000 task.ti: 8f880000
[  240.697137] $ 0   : 00000000 80ab0008 00000000 00000000
[  240.702972] $ 4   : 00000000 00000000 00000000 00000000
[  240.708803] $ 8   : 80a3e73c 00000001 03dfd242 00000000
[  240.714636] $12   : 00000012 00000000 00000000 000003af
[  240.720468] $16   : 00000000 00000000 80aa3364 80aa5528
[  240.726302] $20   : 80a3e73c 80a3e5c0 80a40000 000000a0
[  240.732136] $24   : 00000000 8040feb4
[  240.737967] $28   : 8f880000 8f881eb0 00000001 80466ed0
[  240.743802] Hi    : 00000002
[  240.747006] Lo    : 00000000
[  240.750222] epc   : 8040fecc r4k_wait_irqoff+0x18/0x20
[  240.755947] ra    : 80466ed0 cpu_startup_entry+0x150/0x294
[  240.762050] Status: 1100fc03 KERNEL EXL IE
[  240.766718] Cause : 90800400 (ExcCode 00)
[  240.771172] PrId  : 0001a120 (MIPS interAptiv (multi))
[  240.776897] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.4.14 #7
[  240.783486] Stack : 00000000 00000000 80ab68da 00000033 00000000 00000000 80a40000 80af0000
          8f854c28 80a42543 80981c28 00000002 00000000 80ab3650 80987268 000000a0
          80a40000 8046f504 00000000 00000000 00000000 00000000 8098709c 8f881c1c
          00000000 8046d218 80a40000 80af0000 804100e8 80a40000 00000000 00881c1c
          00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
          ...
[  240.823145] Call Trace:
[  240.825875] [<80413f70>] show_stack+0x50/0x84
[  240.830735] [<806442b8>] dump_stack+0xd4/0x10c
[  240.835695] [<804967f4>] flush_smp_call_function_queue+0x11c/0x1bc
[  240.842583] [<80674398>] ipi_call_interrupt+0x10/0x20
[  240.848219] [<80470bc4>] handle_irq_event_percpu+0x68/0x1a4
[  240.854429] [<80475070>] handle_percpu_irq+0x88/0xb8
[  240.859963] [<804702c0>] generic_handle_irq+0x28/0x38
[  240.865592] [<806742d0>] gic_handle_shared_int+0x1e0/0x238
[  240.871707] [<804702c0>] generic_handle_irq+0x28/0x38
[  240.877340] [<8040ffc4>] do_IRQ+0x1c/0x2c
[  240.881818] [<80672a24>] plat_irq_dispatch+0x98/0xc4
[  240.887345]
[  240.889014] Kernel panic - not syncing: hung_task: blocked tasks
[  240.903131] Rebooting in 3 seconds..
[  242.340840] ------------[ cut here ]------------
[  242.346215] WARNING: CPU: 0 PID: 209 at kernel/smp.c:417 smp_call_function_many+0xb8/0x340()
[  242.355614] Modules linked in: uccp420wlan mac80211 cfg80211 compat pppoe ppp_async iptable_nat pppox ppp_generic pistachio nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 ipt_REJECT ipt_MASQUERADE xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_CT snd_soc_tpa6130a2 slhc sc16is7xx rfcomm pistachio_internal_dac pistachio_event_timer_module nhc_udp nhc_routing nhc_mobility nhc_ipv6 nhc_hop nhc_fragment nhc_dest nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_raw iptable_mangle iptable_filter ip_tables img_spdif_out img_spdif_in img_parallel_out img_i2s_out img_i2s_in hidp hci_uart btusb btintel bnep bluetooth ca8210sm mac802154 ieee802154_6lowpan ieee802154_socket ieee802154 6lowpan snd_soc_core i2c_dev ledtrig_heartbeat ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables snd_pcm_dmaengine snd_compress snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd soundcore ecb cmac leds_gpio aead crypto_null
[  242.471330] CPU: 0 PID: 209 Comm: khungtaskd Not tainted 4.4.14 #7
[  242.478213] Stack : 00000000 00000000 80ab68da 00000036 00000000 00000000 80a40000 80af0000
          8fb04598 80a42543 80981c28 00000000 000000d1 80ab3650 80a3e73c 00000000
          00000000 8046f504 80a40000 80af0000 80a472e8 80a472ec 8098709c 8f947d14
          00000003 8046d218 80a3e73c 00000000 00000000 80a40000 00000000 00947d14
          00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
          ...
[  242.517903] Call Trace:
[  242.520642] [<80413f70>] show_stack+0x50/0x84
[  242.525507] [<806442b8>] dump_stack+0xd4/0x10c
[  242.530503] [<8042eab0>] warn_slowpath_common+0xa0/0xd0
[  242.536341] [<8042eb64>] warn_slowpath_null+0x18/0x24
[  242.541987] [<80496eac>] smp_call_function_many+0xb8/0x340
[  242.548115] [<80497154>] smp_call_function+0x20/0x30
[  242.553678] [<80411f74>] machine_restart+0x2c/0x6c
[  242.559030] [<8042e858>] panic+0x19c/0x20c
[  242.563619] [<8049cfd4>] watchdog+0x408/0x418
[  242.568503] [<804495e4>] kthread+0x118/0x124
[  242.573276] [<80400698>] ret_from_kernel_thread+0x14/0x1c
[  242.579290]
[  242.580958] ---[ end trace 92dd817aa09ed8d9 ]---

U-Boot SPL 2015.10-v1.0.4 (Jan 06 2017 - 13:44:31)

U-Boot 2015.10-v1.0.4 (Jan 06 2017 - 13:44:31 +0000), Build: jenkins-CreatorDev-u-boot-2015.10-9

MIPS(interAptiv): IMG Pistachio 546MHz.
Model: IMG Marduk
DRAM:  256 MiB
NAND:  512 MiB
MMC:   Synopsys Mobile storage: 0
SF: Detected W25Q16CL with page size 256 Bytes, erase size 4 KiB, total 2 MiB
In:    uart@18101500
Out:   uart@18101500
Err:   uart@18101500
TPM:   1.2 TPM (open, chip type slb9645tt device-id 0x1a)
Net:   eth0: ethernet@18140000
Hit any key to stop autoboot:  0
pistachio #
HarryMorris commented 7 years ago

Issue replicated, related to deadlock of sync_command_mutex. Synchronous command handling has been reworked to no longer require a mutex with commit 0a6b91e. Issue no longer observed on my identical setup.

tgillbe commented 7 years ago

Commit baf5afb1176ae51c41d76f5a30412c89dd15bca2 now works for me, thanks!