Part Number:PROCESSOR-SDK-AM335X
Hi,
When I insert a GPT style FAT formatted USB flash drive it doesn't get detected and I get the below kernel crash at times during the USB flash removal time. The kernel I use is 4.9.31-gf9f6f0db2d (Arago).
[ 112.833987] ------------[ cut here ]------------
[ 112.834049] WARNING: CPU: 0 PID: 113 at drivers/dma/cppi41.c:700 cppi41_stop_chan+0x260/0x350
[ 112.834105] Modules linked in: wl12xx usb_storage scsi_mod usb_f_ecm g_ether usb_f_rndis u_ether libcomposite configfs arc4 wl18xx wlcore mac80211 cfg80211 musb_dsps musb_hdrc udc_core phy_am335x phy_generic usbcore phy_am335x_control usb_common ti_am335x_adc ecb pm33xx wkup_m3_ipc sha256_generic wkup_m3_rproc hmac remoteproc virtio virtio_ring md5 sha1_generic sha1_arm_neon sha1_arm omap_aes_driver pinmux_helper(O) ti_emif_sram crypto_engine omap_sham pruss_soc_bus omap_rng rng_core wlcore_sdio rtc_pcf85263(O) musb_am335x rtc_omap omap_wdt ti_am335x_tscadc sch_fq_codel [last unloaded: wl12xx]
[ 112.834548] CPU: 0 PID: 113 Comm: kworker/0:3 Tainted: G O 4.9.31-gf9f6f0db2d #7
[ 112.834604] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 112.834958] Workqueue: usb_hub_wq hub_event [usbcore]
[ 112.834999] Backtrace:
[ 112.835060] [<c010b6c8>] (dump_backtrace) from [<c010b984>] (show_stack+0x18/0x1c)
[ 112.835120] r7:00000009 r6:00000000 r5:c09ceaf8 r4:00000000
[ 112.835167] [<c010b96c>] (show_stack) from [<c03c6224>] (dump_stack+0x24/0x28)
[ 112.835234] [<c03c6200>] (dump_stack) from [<c012b03c>] (__warn+0xe8/0x100)
[ 112.835282] [<c012af54>] (__warn) from [<c012b10c>] (warn_slowpath_null+0x28/0x30)
[ 112.835342] r9:cd101000 r8:0000003c r7:00000001 r6:cb22d010 r5:cb22d018 r4:cb30c130
[ 112.835404] [<c012b0e4>] (warn_slowpath_null) from [<c04599ac>] (cppi41_stop_chan+0x260/0x350)
[ 112.835559] [<c045974c>] (cppi41_stop_chan) from [<bf127aa0>] (cppi41_dma_channel_abort+0x138/0x2a4 [musb_hdrc])
[ 112.835628] r9:bf12af8c r8:cc5aa010 r7:bf12afa0 r6:00000004 r5:00000000 r4:cc64c064
[ 112.835753] [<bf127968>] (cppi41_dma_channel_abort [musb_hdrc]) from [<bf1200d4>] (musb_cleanup_urb+0x60/0x1e0 [musb_hdrc])
[ 112.835824] r10:cc64c064 r9:cc5aa010 r8:d0bcb410 r7:c0010280 r6:cb045d00 r5:00000080
[ 112.835876] r4:cc5aa4c8
[ 112.835975] [<bf120074>] (musb_cleanup_urb [musb_hdrc]) from [<bf120968>] (musb_urb_dequeue+0x150/0x158 [musb_hdrc])
[ 112.836043] r10:00000001 r9:cb694480 r8:00000000 r7:c0010280 r6:cc5aa010 r5:a0060093
[ 112.836095] r4:cb045d00
[ 112.836294] [<bf120818>] (musb_urb_dequeue [musb_hdrc]) from [<bf0c7a34>] (unlink1+0x34/0x14c [usbcore])
[ 112.836363] r10:cb2f8a00 r9:cb2f8a74 r8:cb289000 r7:ffffff94 r6:cb289000 r5:cc720000
[ 112.836418] r4:cb045d00 r3:bf120818
[ 112.836675] [<bf0c7a00>] (unlink1 [usbcore]) from [<bf0c9e84>] (usb_hcd_flush_endpoint+0x144/0x184 [usbcore])
[ 112.836744] r9:cb2f8a74 r8:cb289000 r7:c9819e38 r6:c9819e50 r5:cc720000 r4:cb045d00
[ 112.837024] [<bf0c9d40>] (usb_hcd_flush_endpoint [usbcore]) from [<bf0cceb0>] (usb_disable_endpoint+0x90/0x98 [usbcore])
[ 112.837093] r9:cb2f8a74 r8:00000000 r7:c99da400 r6:c99fb488 r5:c99da400 r4:c9819e38
[ 112.837373] [<bf0cce20>] (usb_disable_endpoint [usbcore]) from [<bf0ccf04>] (usb_disable_interface+0x4c/0x5c [usbcore])
[ 112.837437] r5:00000002 r4:00000070
[ 112.837694] [<bf0cceb8>] (usb_disable_interface [usbcore]) from [<bf0cf914>] (usb_unbind_interface+0x1fc/0x2b8 [usbcore])
[ 112.837764] r9:cb2f8a74 r8:cb2f8a20 r7:bf30ff70 r6:00000000 r5:cb2f8a54 r4:bf30ff70
[ 112.837946] [<bf0cf718>] (usb_unbind_interface [usbcore]) from [<c0502d48>] (device_release_driver_internal+0x154/0x1e8)
[ 112.838017] r10:00000001 r9:cb2f8a74 r8:00000034 r7:bf30ff70 r6:00000000 r5:cb2f8a54
[ 112.838069] r4:cb2f8a20
[ 112.838108] [<c0502bf4>] (device_release_driver_internal) from [<c0502df4>] (device_release_driver+0x18/0x1c)
[ 112.838174] r9:cb2f8a74 r8:cb2f8a28 r7:c0c86de0 r6:bf0e0a5c r5:cb2f8a20 r4:cb35ac2c
[ 112.838235] [<c0502ddc>] (device_release_driver) from [<c0501cf4>] (bus_remove_device+0xe0/0x10c)
[ 112.838299] [<c0501c14>] (bus_remove_device) from [<c04fea3c>] (device_del+0x1f0/0x304)
[ 112.838358] r7:c0c86de0 r6:c99da470 r5:cb2f8a20 r4:cb2f8a74
[ 112.838513] [<c04fe84c>] (device_del) from [<bf0ccfbc>] (usb_disable_device+0xa8/0x1ec [usbcore])
[ 112.838578] r9:cb2f8e00 r8:cb2f8a00 r7:cb289000 r6:00000000 r5:00000001 r4:c99da400
[ 112.838857] [<bf0ccf14>] (usb_disable_device [usbcore]) from [<bf0c3a18>] (usb_disconnect+0x78/0x24c [usbcore])
[ 112.838925] r9:cb2f8e00 r8:cb389600 r7:c99da4a4 r6:c99da470 r5:c99da400 r4:00000000
[ 112.839200] [<bf0c39a0>] (usb_disconnect [usbcore]) from [<bf0c558c>] (hub_event+0x598/0x1118 [usbcore])
[ 112.839266] r10:00000001 r9:00000001 r8:cb39d8fc r7:00000000 r6:cb2bdc00 r5:00000001
[ 112.839320] r4:00000000 r3:cb389600
[ 112.839473] [<bf0c4ff4>] (hub_event [usbcore]) from [<c0141eb4>] (process_one_work+0x144/0x41c)
[ 112.839538] r10:cb23d680 r9:00000000 r8:c0c0f5e4 r7:ccd7f000 r6:00000000 r5:cb23d680
[ 112.839591] r4:cb39d8fc
[ 112.839626] [<c0141d70>] (process_one_work) from [<c01421f8>] (worker_thread+0x6c/0x618)
[ 112.839688] r10:cb23d680 r9:00000008 r8:c0c0f5f8 r7:c0c14d40 r6:cb23d698 r5:cc720000
[ 112.839740] r4:c0c0f5e4
[ 112.839782] [<c014218c>] (worker_thread) from [<c0147de8>] (kthread+0xf8/0x110)
[ 112.839841] r10:00000000 r9:00000000 r8:c014218c r7:cb23d680 r6:cc720000 r5:cb1b5380
[ 112.839894] r4:00000000
[ 112.839933] [<c0147cf0>] (kthread) from [<c0107c38>] (ret_from_fork+0x14/0x3c)
[ 112.839991] r8:00000000 r7:00000000 r6:00000000 r5:c0147cf0 r4:cb1b5380
[ 112.840030] ---[ end trace 52cd3a4f1ba8f685 ]---
In addition, there are times when I get the below dmesg dump when I had inserted the USB flash drive on the system.
[ 3776.006935] sd 0:0:0:0: [sda] Write Protect is off
[ 3776.006986] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[ 3776.007243] sd 0:0:0:0: [sda] No Caching mode page found
[ 3776.007292] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 3776.433558] sda: sda1
[ 3776.437536] FAT-fs (sda): bogus number of reserved sectors
[ 3776.437624] FAT-fs (sda): Can't find a valid FAT filesystem
[ 3776.447095] sd 0:0:0:0: [sda] Attached SCSI removable disk
Both these issues occur at times. A mere removal and insertion of the USB flash drive resolves this but issues like this affect us. We want USB detection/removal to be reliable and robust. Are there any latest patches etc available for this? Why do I get these issues at times?