This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3354: Intermittent USB read/write failures

Part Number: AM3354

Tool/software: Linux

Hi,

I am working on a board based on TI Sitara 335x. using Sitara SDK Version 7.00.00, Ubuntu 12.04.5LTS, GNU/Linux 3.12.10-ti2013.12.01 armv71. Board is having two USB ports. When I insert an USB drive on any of these ports it's mounting successfully but observing intermittent I/O errors and causing my application to hang and crash and need to reboot. I/O errors are  observed during both READ and WRITE operations.

Below is the snapshot of the output of 'dmesg' command when USB failure observed.

[11149.266851] ------------[ cut here ]------------
[11149.266911] WARNING: CPU: 0 PID: 18652 at drivers/dma/cppi41.c:612 cppi41_dma_control+0x29c/0x2e0()
[11149.266918] Modules linked in: bufferclass_ti(O) omaplfb(O) pvrsrvkm(O) snd_soc_omap snd_pcm_dmaengine musb_dsps musb_hdrc musb_am335x
[11149.266959] CPU: 0 PID: 18652 Comm: scsi_eh_12 Tainted: G        W  O 3.12.10-ti2013.12.01 #1
[11149.266967] Backtrace:
[11149.266991] [<c0017878>] (dump_backtrace+0x0/0x10c) from [<c0017a14>] (show_stack+0x18/0x1c)
[11149.266998]  r6:c031e15c r5:00000009 r4:00000000 r3:00000000
[11149.267028] [<c00179fc>] (show_stack+0x0/0x1c) from [<c05d0bb8>] (dump_stack+0x20/0x28)
[11149.267048] [<c05d0b98>] (dump_stack+0x0/0x28) from [<c0046894>] (warn_slowpath_common+0x70/0x90)
[11149.267062] [<c0046824>] (warn_slowpath_common+0x0/0x90) from [<c00468d8>] (warn_slowpath_null+0x24/0x2c)
[11149.267068]  r8:0000003c r7:00000001 r6:00000022 r5:ed422000 r4:ed3664c0
[11149.267088] [<c00468b4>] (warn_slowpath_null+0x0/0x2c) from [<c031e15c>] (cppi41_dma_control+0x29c/0x2e0)
[11149.267150] [<c031dec0>] (cppi41_dma_control+0x0/0x2e0) from [<bf00cd74>] (cppi41_dma_channel_abort+0xc4/0x130 [musb_hdrc])
[11149.267185] [<bf00ccb0>] (cppi41_dma_channel_abort+0x0/0x130 [musb_hdrc]) from [<bf008740>] (musb_cleanup_urb+0x48/0xf8 [musb_hdrc])
[11149.267191]  r8:ed7d6010 r7:ed3f7068 r6:ec667240 r5:f0c4a520 r4:ed7d63f0
[11149.267191] r3:bf00ccb0
[11149.267229] [<bf0086f8>] (musb_cleanup_urb+0x0/0xf8 [musb_hdrc]) from [<bf008900>] (musb_urb_dequeue+0x110/0x124 [musb_hdrc])
[11149.267255] [<bf0087f0>] (musb_urb_dequeue+0x0/0x124 [musb_hdrc]) from [<c0413c58>] (unlink1+0x34/0x10c)
[11149.267267] [<c0413c24>] (unlink1+0x0/0x10c) from [<c04151bc>] (usb_hcd_unlink_urb+0x60/0x7c)
[11149.267280] [<c041515c>] (usb_hcd_unlink_urb+0x0/0x7c) from [<c0415b40>] (usb_unlink_urb+0x34/0x50)
[11149.267285]  r7:0000000a r6:000003e8 r5:ec0c6000 r4:ec0c6370
[11149.267307] [<c0415b0c>] (usb_unlink_urb+0x0/0x50) from [<c04479e8>] (usb_stor_stop_transport+0x64/0x68)
[11149.267319] [<c0447984>] (usb_stor_stop_transport+0x0/0x68) from [<c04467e8>] (command_abort+0x90/0x9c)
[11149.267325]  r4:ec0c6370 r3:ec0c6000
[11149.267354] [<c0446758>] (command_abort+0x0/0x9c) from [<c038263c>] (scsi_send_eh_cmnd+0x154/0x370)
[11149.267360]  r4:e40f82c0 r3:c0446758
[11149.267375] [<c03824e8>] (scsi_send_eh_cmnd+0x0/0x370) from [<c0382894>] (scsi_eh_tur+0x3c/0x74)
[11149.267388] [<c0382858>] (scsi_eh_tur+0x0/0x74) from [<c03829b4>] (scsi_eh_test_devices+0x78/0x170)
[11149.267393]  r7:ed6bdf20 r6:00000000 r5:ed6bdf30 r4:e40f82c0
[11149.267411] [<c038293c>] (scsi_eh_test_devices+0x0/0x170) from [<c0383c80>] (scsi_error_handler+0x3f8/0x470)
[11149.267426] [<c0383888>] (scsi_error_handler+0x0/0x470) from [<c005f768>] (kthread+0xac/0xb8)
[11149.267449] [<c005f6bc>] (kthread+0x0/0xb8) from [<c00146f8>] (ret_from_fork+0x14/0x3c)
[11149.267455]  r7:00000000 r6:00000000 r5:c005f6bc r4:ed13fb04
[11149.267467] ---[ end trace 1b75b31a2719ed65 ]---
[11149.386879] usb 1-1: reset high-speed USB device number 12 using musb-hdrc
[11156.268077] init: serial main process (21325) terminated with status 1
[11156.268283] init: serial main process ended, respawning
[11165.646879] usb 1-1: reset high-speed USB device number 12 using musb-hdrc
[11165.906849] usb 1-1: reset high-speed USB device number 12 using musb-hdrc
[11166.288097] init: serial main process (21339) terminated with status 1
[11166.288308] init: serial main process ended, respawning
[11176.166899] usb 1-1: reset high-speed USB device number 12 using musb-hdrc
[11176.308137] init: serial main process (21351) terminated with status 1
[11176.308337] init: serial main process ended, respawning
[11176.311810] sd 12:0:0:0: Device offlined - not ready after error recovery
[11176.311875] sd 12:0:0:0: [sda] Unhandled error code
[11176.311886] sd 12:0:0:0: [sda]
[11176.311895] Result: hostbyte=0x05 driverbyte=0x00
[11176.311903] sd 12:0:0:0: [sda] CDB:
[11176.311911] cdb[0]=0x28: 28 00 00 00 01 b8 00 00 08 00
[11176.311939] end_request: I/O error, dev sda, sector 440
[11176.317492] Buffer I/O error on device sda1, logical block 39

[11176.323822] sd 12:0:0:0: rejecting I/O to offline device

[11176.334857] sd 12:0:0:0: rejecting I/O to offline device
[11176.351581] sd 12:0:0:0: rejecting I/O to offline device
[11176.357548] sd 12:0:0:0: rejecting I/O to offline device
[11176.363181] sd 12:0:0:0: rejecting I/O to offline device
[11176.368889] sd 12:0:0:0: rejecting I/O to offline device
[11186.352965] init: serial main process (21364) terminated with status 1
[11186.353163] init: serial main process ended, respawning
[11196.373267] init: serial main process (21378) terminated with status 1
[11196.373479] init: serial main process ended, respawning

Regards,

Suresh