Difference between revisions of "SATA issues"

From ElphelWiki
Jump to: navigation, search
(Created page with "== Issue 1: Handshake Error during fast recording == === Description === AHCI controller sets Handshake Error bit in PxSERR register and Interface Fatal Error Status bit in PxIS ...")
 
 
Line 49: Line 49:
 
</font>
 
</font>
 
This disk can be used from the system without this issue although long run tests have not been performed.
 
This disk can be used from the system without this issue although long run tests have not been performed.
 +
== Current state ==
 +
These errors and some other were corrected. No known SATA issues since April 13, 2017

Latest revision as of 11:18, 2 October 2017

Issue 1: Handshake Error during fast recording

Description

AHCI controller sets Handshake Error bit in PxSERR register and Interface Fatal Error Status bit in PxIS register. If debug messages for AHCI driver are enabled in sysfs then system log will contain the following record:

elphel_irq_handler: elphel-ahci 80000000.elphel-ahci: irq_stat = 0x8000000, host irq_stat = 0x1, SErr = 0x400000

The status of controller registers read from Python interface after system driver has started recovery is the following:

>>> sata.reg_status()
HBA_PORT__PxIS: 0x04000000 [80000110]
       1 : INFS (Interface Non-Fatal Error Status (sect. 6.1.2))
HBA_PORT__PxCMD: 0x00040007 [80000118]
       1 : HPCP (Hot Plug Capable Port)
       1 : POD (Power On Device (RW with Cold Presence Detection))
       1 : SUD (Spin-Up Device (RW with Staggered Spin-Up Support))
       1 : ST (Start (HBA may process commands). See section 10.3.1)
HBA_PORT__PxTFD: 0x000001d0 [80000120]
       1 : ERR (Latest Copy of Task File Error Register)
       1 : STS.BSY (Latest Copy of Task File Status Register: BSY)
       5 : STS.64 (Latest Copy of Task File Status Register: command-specific bits 4..6 )
HBA_PORT__PxSIG: 0x00000101 [80000124]
     101 : SIG (Data in the first D2H Register FIS)
HBA_PORT__PxSSTS: 0x00000123 [80000128]
       1 : IPM (Interface Power Management)
       2 : SPD (Interface Speed)
       3 : DET (Device Detection (should be detected if COMINIT is received))
HBA_PORT__PxSERR: 0x00400000 [80000130]
       1 : DIAG.H (Handshake Error (i.e. Device got CRC error))
HBA_PORT__PxCI: 0x00000001 [80000138]
       1 : CI (Command Issued: bit per Port, only set when PxCMD.ST==1, also cleared by PxCMD.ST: 1->0 by soft)

How to reproduce

This error can be reliably reproduced during fast recording to SanDisk SD7SF6S256G1122 mSATA SSD connected to eSATA port. All camera related software should be disabled during test as it will interfere with the test program. Edit /etc/init.d/init_elphel393

$CONFDIR/init_elphel393.py "{\"usb_hub\"         :0,\"ip\"              :1,\"mcntrl\"          :0,\"imgsrv\"          :0,\"port1\"           :0,\"port2\"           :0,\"port3\"           :0,\"port4\"           :0,\"framepars\" 
:0,\"autoexp_daemon\"  :0,\"autocampars\"  :0,\"autoexp\"  :0,\"autowb\"  :0,\"sata\"  :0,\"gps\"  :0,\"eyesis\"  :0 }"

and restart camera. Start AHCI controller configuration program,

root@elphel393:~# x393sata.py

switch SATA multiplexer to external disk (from browser)

http://192.168.0.38/x393_vsc330x.php?c:zynq=esata

and reload disk driver. Start test program and the error will most likely appear within several seconds of recording:

root@elphel393:~# camogm_test -d /dev/sda2 -b 3000000 -c 1000

This disk can be used from the system without this issue although long run tests have not been performed.

Current state

These errors and some other were corrected. No known SATA issues since April 13, 2017