10393 SSD Debugging
From ElphelWiki
Enable Panic
- enable_panic.sh
#!/bin/bash # Enable kernel panic in disk drivers when command timeout has occurred for IP in `seq 161 163`; do ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.0."$IP" ssh root@192.168.0."$IP" 'echo 1 > /sys/devices/soc0/amba\@0/80000000.elphel-ahci/enable_panic_flag' ssh root@192.168.0."$IP" 'echo module ahci_elphel line 526 +p > /sys/kernel/debug/dynamic_debug/control' done
Read SATA buffer
- read_sata_buffer.py
#!/usr/bin/env python from __future__ import print_function from __future__ import division import x393sata import x393_mem mem = x393_mem.X393Mem(1,0,1) sata = x393sata.x393sata() hex([((mem.read_mem(0x80000ffc) >> 10) & 0xffc) + 0x80001000,mem.mem_dump (0x80001000, 0x400,4),sata.reg_status()][0]) print("'"+hex(((mem.read_mem(0x80000ffc)>>10)&0xffc)+0x80001000)+"'")