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.

DM8148 - SATA drivers: SATA disk gets unmounted during access and drivers returns some errors?



 Team,

- Here are some errors seen when using the SATA linux drivers on the DM8148 EVM. The post will be updated with the DVSDK version soon.

- In the mean time here is a description of the problem (in blue).

Thanks and best regardas,
Anthony

Experiencing some difficulties with utilizing the SATA hard disk functionality. When a drive is connected, the OS successfully identifies and mounts the drives partition. I am able to navigate through directories on the drive and execute applications off it. One of the tests I am running creates a file at a target location, writes data to it for 10 seconds and then reads it back.

When running this test on the hard disk, I get numerous warning/error messages reported over the terminal connection (many related to interface errors and the command queue). The partition is often un-mounted by the OS during this test, causing it to fail. If it is not un-mounted, the data throughput is sporadically very poor (measured in 100s of kilobytes a second rather than megabytes a second). The test application executes successfully on an attached USB pen drive on the same platform.

As far as I can tell, the SATA connector is a 1.5Gbps interface, so I attempted the same test after configuring a jumper of the hard disk to force 1.5Gbps (rather than 3) and experienced the same results. I have performed the test on the following drives:
·         Samsung HD103UJ (1TB, 7200RPM, 8MB Cache, SATAII)
·         Samsung HD161HJ (160GB, 7200RPM, 32 MB Cache, SATAII)
·         Samsung HD161HJ (160GB, 7200RPM, 32 MB Cache, SATAII – forced to 1.5Gbps with jumper)

 I have also tried 3 SATA cables that have been used successfully on other platforms to rule a faulty cable out.

I have executed this test application on multiple platforms without any similar issues. Do you know of any known issues with hard disk access on this platform or possible fixes?

- I have copied an example of the reported errors generated immediately after running the test application at the bottom of this email. I would be grateful for any assistance you can give:
Example errors:
ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x6 frozen

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/02:00:a2:63:12/00:00:00:00:00/40 tag 0 ncq 1024 in

         res 40/00:04:20:01:00/00:00:00:00:00/40 Emask 0x4 (timeout)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link down (SStatus 1 SControl 310)

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/133

ata1: EH complete

ata1.00: exception Emask 0x12 SAct 0x1 SErr 0xa80501 action 0x6 frozen

ata1.00: irq_stat 0x09000000, interface fatal error

ata1: SError: { RecovData UnrecovData Proto 10B8B BadCRC LinkSeq }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/02:00:68:bd:12/00:00:00:00:00/40 tag 0 ncq 1024 in

         res 40/00:04:68:bd:12/00:00:00:00:00/40 Emask 0x12 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: softreset failed (1st FIS failed)

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: qc timeout (cmd 0xec)

ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)

ata1.00: revalidation failed (errno=-5)

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/133

ata1: EH complete

ata1.00: exception Emask 0x12 SAct 0x1 SErr 0x1280501 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { RecovData UnrecovData Proto 10B8B BadCRC TrStaTrns }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/04:00:84:c4:13/00:00:00:00:00/40 tag 0 ncq 2048 in

         res 40/00:04:84:c4:13/00:00:00:00:00/40 Emask 0x12 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/133

ata1: EH complete

ata1.00: limiting speed to UDMA/100:PIO4

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x280100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData 10B8B BadCRC }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/04:00:e0:d4:13/00:00:00:00:00/40 tag 0 ncq 2048 in

         res 40/00:04:e0:d4:13/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/100

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x280100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData 10B8B BadCRC }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/04:00:88:ed:13/00:00:00:00:00/40 tag 0 ncq 2048 in

         res 40/00:04:88:ed:13/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/100

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x400100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData Handshk }

ata1.00: failed command: WRITE FPDMA QUEUED

ata1.00: cmd 61/08:00:b0:e1:14/00:00:00:00:00/40 tag 0 ncq 4096 out

         res 40/00:04:b0:e1:14/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/100

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x400100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData Handshk }

ata1.00: failed command: WRITE FPDMA QUEUED

ata1.00: cmd 61/08:00:28:3a:15/00:00:00:00:00/40 tag 0 ncq 4096 out

         res 40/00:04:28:3a:15/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/100

ata1: EH complete

ata1.00: limiting speed to UDMA/33:PIO4

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x400100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData Handshk }

ata1.00: failed command: WRITE FPDMA QUEUED

ata1.00: cmd 61/08:00:60:49:15/00:00:00:00:00/40 tag 0 ncq 4096 out

         res 40/00:04:60:49:15/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x12 SAct 0x1 SErr 0x800500 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData Proto LinkSeq }

ata1.00: failed command: WRITE FPDMA QUEUED

ata1.00: cmd 61/08:00:50:ae:15/00:00:00:00:00/40 tag 0 ncq 4096 out

         res 40/00:04:50:ae:15/00:00:00:00:00/40 Emask 0x12 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x280100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData 10B8B BadCRC }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/08:00:28:89:14/00:00:00:00:00/40 tag 0 ncq 4096 in

         res 40/00:04:28:89:14/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x400100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData Handshk }

ata1.00: failed command: WRITE FPDMA QUEUED

ata1.00: cmd 61/10:00:30:b8:16/00:00:00:00:00/40 tag 0 ncq 8192 out

         res 40/00:04:30:b8:16/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x400100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData Handshk }

ata1.00: failed command: WRITE FPDMA QUEUED

ata1.00: cmd 61/10:00:e0:e1:16/00:00:00:00:00/40 tag 0 ncq 8192 out

         res 40/00:04:e0:e1:16/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x280100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData 10B8B BadCRC }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/10:00:60:fd:15/00:00:00:00:00/40 tag 0 ncq 8192 in

         res 40/00:04:60:fd:15/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x6 frozen

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/10:00:40:05:16/00:00:00:00:00/40 tag 0 ncq 8192 in

         res 40/00:04:60:fd:15/00:00:00:00:00/40 Emask 0x4 (timeout)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x280100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData 10B8B BadCRC }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/10:00:90:1a:16/00:00:00:00:00/40 tag 0 ncq 8192 in

         res 40/00:04:90:1a:16/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x280100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData 10B8B BadCRC }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/10:00:60:91:16/00:00:00:00:00/40 tag 0 ncq 8192 in

         res 40/00:04:60:91:16/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x12 SAct 0x1 SErr 0x1280500 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData Proto 10B8B BadCRC TrStaTrns }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/10:00:00:c7:16/00:00:00:00:00/40 tag 0 ncq 8192 in

         res 40/00:04:00:c7:16/00:00:00:00:00/40 Emask 0x12 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x200100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData BadCRC }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/10:00:f0:ea:16/00:00:00:00:00/40 tag 0 ncq 8192 in

         res 40/00:04:f0:ea:16/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x200100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData BadCRC }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/10:00:90:14:17/00:00:00:00:00/40 tag 0 ncq 8192 in

         res 40/00:04:90:14:17/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x280100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData 10B8B BadCRC }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/10:00:30:38:17/00:00:00:00:00/40 tag 0 ncq 8192 in

         res 40/00:04:30:38:17/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY }

ata1: hard resetting link

<Continues for 1000s of lines>

  • Apologies for my slow response. The platform was used 'as-is'  when it was received from TI.  I pulled the following details off the debug port at boot-up

     

    Hardware: TI8148-GP rev 2.1
    Image Name:   Arago/2.6.37-psp04.01.00.05/dm81
    Image Type:   ARM Linux Kernel Image (uncompressed)
    Data Size:    2457256 Bytes = 2.3 MiB

    Image is on an an SD card supplied with the AM387x Evaluation Module, labelled:
    "8GB SD
    Texas Instruments
    DM814x/AM387x
    Demos and SDK
    Linux Kernel 2.6.37 Demo
    AC_LSDK_CSDC_B"

    I have made no configuration changes to the OS image/configuration.

    Regards,
    -A.Hogan 

  • Andrew,

    I would then first advise to install the lastest EZSDK 5.03:
    http://www.ti.com/tool/linuxezsdk-davinci

    You can then upgrade the system on the SD card. Instruction to create a new SD card are provided in the EZ SW developers guide at the EZSDK download page.
    A new version of the PSP (ie Linux drivers) is provided in this EZSDK release.

    The PSP 4.01.00.07 release notes and performance guide are as well available from the Twiki:
    http://processors.wiki.ti.com/index.php/Category:DM814x

    There are some defect listed for SATA in the release notes:
    http://processors.wiki.ti.com/index.php/DM814x_AM387x_PSP_04.01.00.07_Release_Notes
    Also the feature performance guide does link to some SATA FAQs that would provide more general info on SATA support:
    http://processors.wiki.ti.com/index.php/TI_SATA_FAQ

    Best regards,

    Anthony

  • Hi

    Can you please try the attached patch(rename .txt  to .patch)2086.sata_timeout_fix.txt and see if it addresses your issue.

    Note: we have tested with the patch extensively for more than a week

    Regards

    Sriram

  • What was the reasoning for these changes?  When will these be made available to the SDK releases?

  • I see a errors similar to what has been posted.  I'm using bonnie++ on a hardrive.  With and without the above patch.

    My drive does not umount with or without the patch.

    # time bonnie\+\+ -u root
    Using uid:0, gid:0.
    Writing with putc()...done
    Writing intelligently...done
    Rewriting...ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x280100 action 0x6 frozen
    ata1.00: irq_stat 0x08000000, interface fatal error
    ata1: SError: { UnrecovData 10B8B BadCRC }
    ata1.00: failed command: READ FPDMA QUEUED
    ata1.00: cmd 60/00:00:df:6e:3a/01:00:00:00:00/40 tag 0 ncq 131072 in
    res 40/00:04:df:6e:3a/00:00:00:00:00/40 Emask 0x10 (ATA bus error)
    ata1.00: status: { DRDY }
    ata1: hard resetting link
    ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
    ata1.00: configured for UDMA/133
    ata1: EH complete
    done
    Reading with getc()...done
    Reading intelligently...ata1.00: exception Emask 0x12 SAct 0x1 SErr 0x1080500 action 0x6 frozen
    ata1.00: irq_stat 0x08000000, interface fatal error
    ata1: SError: { UnrecovData Proto 10B8B TrStaTrns }
    ata1.00: failed command: READ FPDMA QUEUED
    ata1.00: cmd 60/00:00:57:32:35/01:00:00:00:00/40 tag 0 ncq 131072 in
    res 40/00:04:57:32:35/00:00:00:00:00/40 Emask 0x12 (ATA bus error)
    ata1.00: status: { DRDY }
    ata1: hard resetting link
    ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
    ata1.00: configured for UDMA/133
    ata1: EH complete
    ata1.00: exception Emask 0x12 SAct 0x1 SErr 0x1080500 action 0x6 frozen
    ata1.00: irq_stat 0x08000000, interface fatal error
    ata1: SError: { UnrecovData Proto 10B8B TrStaTrns }
    ata1.00: failed command: READ FPDMA QUEUED
    ata1.00: cmd 60/00:00:7f:ce:35/01:00:00:00:00/40 tag 0 ncq 131072 in
    res 40/00:04:7f:ce:35/00:00:00:00:00/40 Emask 0x12 (ATA bus error)
    ata1.00: status: { DRDY }
    ata1: hard resetting link
    ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
    ata1.00: configured for UDMA/133
    ata1: EH complete
    ata1: limiting SATA link speed to 1.5 Gbps
    ata1.00: exception Emask 0x10 SAct 0x2 SErr 0x280100 action 0x6 frozen
    ata1.00: irq_stat 0x08000000, interface fatal error
    ata1: SError: { UnrecovData 10B8B BadCRC }
    ata1.00: failed command: READ FPDMA QUEUED
    ata1.00: cmd 60/00:08:8f:19:36/01:00:00:00:00/40 tag 1 ncq 131072 in
    res 40/00:0c:8f:19:36/00:00:00:00:00/40 Emask 0x10 (ATA bus error)
    ata1.00: status: { DRDY }
    ata1: hard resetting link
    ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
    ata1.00: configured for UDMA/133
    ata1: EH complete
    done
    start 'em...done...done...done...
    Create files in sequential order...done.
    Stat files in sequential order...done.
    Delete files in sequential order...done.
    Create files in random order...done.
    Stat files in random order...done.
    Delete files in random order...done.
    Version 1.03c ------Sequential Output------ --Sequential Input- --Random-
    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
    touchlink-405fc2 1G 3605 99 50296 24 23355 23 3543 99 70169 43 214.3 2
    ------Sequential Create------ --------Random Create--------
    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
    files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
    16 1050 99 +++++ +++ +++++ +++ 1241 99 +++++ +++ 4696 99
    touchlink-405fc2065ffa,1G,3605,99,50296,24,23355,23,3543,99,70169,43,214.3,2,16,1050,99,+++++,+++,+++++,+++,1241,99,+++++,+++,4696,99
    real 12m 24.44s
    user 9m 30.76s
    sys 1m 8.27s