[Elphel-support] Trouble connecting external SATA HDD

Sebastian Pichelhofer sebastian.pichelhofer at gmail.com
Sun Oct 18 10:06:05 PDT 2009


I am trying to connect an external 2.5" 160GB SATA HDD to my Elphel 353 
using the external SATA connector.
HDD is powered with an external power supply and works flawless when 
connected to a computer.



RS323 output when booting up the camera with HDD connected:

hda: ST9160314AS, ATA DISK drive
ide0 at 0x10000000-0x10000007,0x2c000000 on irq 65
hda: max request size: 128KiB
hda: 312581808 sectors (160041 MB) w/8192KiB Cache, CHS=19457/255/63, (U)DMA
hda: cache flushes supported
 hda:hda: dma_intr: status=0xd0 { Busy }
ide: failed opcode was: unknown
hda: DMA disabled
ide0: reset: success
hda: lost interrupt
 hda1


This is the full output:


ETRAX FS NAND boot loader
=========================
Rev 1, Dec  1 2007 23:56:10
Boot config: 0x00040000->0x40440000, len 0x00200000, boot @ 0x40440000
CPU revision: 0x00000020
Bootloader main at 0x38000ce2
Data end: 0x3800573c
Bss: 0x38008000
Heap: 0x38008000
Identifying nand chip...
maf_id: 0x00000020; dev_id: 0x000000f1
mtd->size == 0x08000000
scan_bbt(); mtd->size == 0x08000000
scan_bbt() ...01; mtd->size == 0x08000000
len == 0x00000100; and BBT_LEN_1 == 0x00000400
scan_bbt() ...02; mtd->size == 0x08000000
scan_bbt() ...03; mtd->size == 0x08000000
scan_bbt() ...1; mtd->size == 0x08000000
scan_bbt() ...2; mtd->size == 0x08000000
scan_bbt() search_read_bbts(); mtd->size == 0x08000000
search_read_bbts() search primary table; mtd->size == 0x08000000
search_bbt() ...1; mtd->size == 0x08000000
search_bbt() ...2; maxblocks: 0x00000004; mtd->size == 0x08000000
Block: 0x000003ff
Check, if we found a bbt for each requested chip
Bad block table found at page0x0000ffc0, version 0x00000001
search_read_bbts() search mirror table
search_bbt() ...1; mtd->size == 0x08000000
search_bbt() ...2; maxblocks: 0x00000004; mtd->size == 0x08000000
Block: 0x000003ff
Block: 0x000003fe
Check, if we found a bbt for each requested chip
Bad block table found at page0x0000ff80, version 0x00000001
nand_read_bbt: Bad block at 0x01c20000
nand_read_bbt: Bad block at 0x02ee0000
scan_bbt() ...3
Done.
Chip identified... 3; NAND 128MiB 3,3V 8-bit
type: 0x00000004
flags: 0x000000c5
size: 0x08000000
erasesize: 0x00020000
oobblock: 0x00000800
oobsize: 0x00000040
ecctype: 0x00000002
eccsize: 0x00000100
Oob info:
useecc: 0x00000002
eccbytes: 0x00000018
eccpos: 0x00000028 0x00000029 0x0000002a 0x0000002b 0x0000002c 
0x0000002d 0x000
Bootload in progress...
New block 0x00040000;len: 0x00200000;start: 0x00040000
New block 0x00060000;len: 0x001e0000;start: 0x00060000
New block 0x00080000;len: 0x001c0000;start: 0x00080000
New block 0x000a0000;len: 0x001a0000;start: 0x000a0000
New block 0x000c0000;len: 0x00180000;start: 0x000c0000
New block 0x000e0000;len: 0x00160000;start: 0x000e0000
New block 0x00100000;len: 0x00140000;start: 0x00100000
New block 0x00120000;len: 0x00120000;start: 0x00120000
New block 0x00140000;len: 0x00100000;start: 0x00140000
New block 0x00160000;len: 0x000e0000;start: 0x00160000
New block 0x00180000;len: 0x000c0000;start: 0x00180000
New block 0x001a0000;len: 0x000a0000;start: 0x001a0000
New block 0x001c0000;len: 0x00080000;start: 0x001c0000
New block 0x001e0000;len: 0x00060000;start: 0x001e0000
New block 0x00200000;len: 0x00040000;start: 0x00200000
New block 0x00220000;len: 0x00020000;start: 0x00220000
complete, status 0x00000000, loaded 0x00200000 bytes
Data in DRAM:
0x25f005b0 0x009cedff 0xbeef05b0
Booting...
Uncompressing Linux...
Done. Now booting the kernel.
Linux version 2.6.19 (whisp at whisper) (gcc version 3.2.1 Axis release 
R64/1.64) 9
Setting up paging and the MMU.
Linux/CRISv32 port on ETRAX FS (C) 2003, 2004 Axis Communications AB
Built 1 zonelists.  Total pages: 8160
Kernel command line: root=/dev/mtdblock3 init=/linuxrc rootfstype=jffs2
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 2, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 1, 16384 bytes)
Memory: 41456k/65536k available (1693k kernel code, 24080k reserved, 
581k data,)
Mount-cache hash table entries: 1024
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -2, 2048 bytes)
TCP established hash table entries: 2048 (order: 0, 8192 bytes)
TCP bind hash table entries: 1024 (order: -1, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
Check hardware configuration of Elphel 353 camera
Elphel 10349/10369 IO extension board is present
fast_timer_init()
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered (default)
Serial: CRISv32 driver $Revision: 1.78 $ <6>ttyS0 at I/O 0xb0026000 (irq 
= 68) 2
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
PPP generic driver version 2.4.2
ETRAX FS 10/100MBit ethernet v0.01 (c) 2003 Axis Communications AB
eth0: changed MAC to 00:40:8C:CD:00:00
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
ide: ETRAX FS built-in ATA DMA controller
cris_ide_init()
hda: ST9160314AS, ATA DISK drive
ide0 at 0x10000000-0x10000007,0x2c000000 on irq 65
hda: max request size: 128KiB
hda: 312581808 sectors (160041 MB) w/8192KiB Cache, CHS=19457/255/63, (U)DMA
hda: cache flushes supported
 hda:hda: dma_intr: status=0xd0 { Busy }
ide: failed opcode was: unknown
hda: DMA disabled
ide0: reset: success
hda: lost interrupt
 hda1
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for 
Belkin / Perr
usbcore: registered new interface driver belkin
drivers/usb/serial/belkin_sa.c: USB Belkin Serial converter driver v1.2
drivers/usb/serial/usb-serial.c: USB Serial support registered for cp2101
usbcore: registered new interface driver cp2101
drivers/usb/serial/cp2101.c: Silicon Labs CP2101/CP2102 RS232 serial 
adaptor dr7
drivers/usb/serial/usb-serial.c: USB Serial support registered for 
Garmin GPS uy
usbcore: registered new interface driver garmin_gps
drivers/usb/serial/garmin_gps.c: garmin gps driver v0.28
drivers/usb/serial/usb-serial.c: USB Serial support registered for MCT U232
usbcore: registered new interface driver mct_u232
drivers/usb/serial/mct_u232.c: Magic Control Technology USB-RS232 
converter dri0
drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver
ETRAX FS stream co-processor driver v0.01, (c) 2003 Axis Communications AB
stream co-processor: init done.
axisflashmap: ...
NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB 
3,3V 8-)
Additional Info: ID byte3=0x80, byte4=0x1d
Flash is rated 30 ns, modifying bif_core_rw_grp3: old=0x6300483, 
new=0x6300001
NAND 128MiB 3,3V 8-bit: 0x08000000 bytes of NAND flash memory.
axisflashmap: Set to boot from NAND flash, making NAND flash primary device.
axisflashmap: flash read 512 bytes at 0x00040000, data: 00 b0 05 f0 25 
ff ed 9c
axisflashmap: partition table offset 10, data: ef be 84 00 88 0e 00 00
axisflashmap: Found a valid partition table at 0xc02eb9ae-0xc02eba3a.
offset == 0x00040000, size == 0x007C0000
offset == 0x00800000, size == 0x01800000
offset == 0x02000000, size == 0x05000000
offset == 0x07000000, size == 0x00C00000
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x08000000 : "main"
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x00040000 : "part0"
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00040000-0x00800000 : "part1"
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00800000-0x02000000 : "part2"
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x02000000-0x07000000 : "part3"
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x07000000-0x07c00000 : "part4"
ETRAX FS GPIO driver v2.5, (c) 2003-2006 Axis Communications AB
Elphel (R) model 353 FPGA (Xilinx (R) XC3S1200E) configuration driver - 132
Elphel (R) model 353 system clocks (PLL frequency synth.) driver - 133
fpga_control- 129
arch/cris/arch-v32/drivers/elphel/framepars.c:341:initGlobalPars 
GLOBALPARS(G_D0
Elphel (R) Model 353 Frame Parameters device driver - 130
Elphel FPGA interrupts initialized
Initializing DMA registers for EXTDMA3 - Elphel (R) Model 353 Camera 
Driver - 16
Elphel (R) model 353 i2c character device driver - 134, 2 channels
Raw image access driver- 131
Elphel (R) Model 353 video buffer device driver- 135
Elphel (R) model 353 Exif device driver - 125
Starting Elphel (R) Model 353 Gamma Tables device driver - 137
Elphel (R) Model 353 Gamma Tables device driver - 137
Elphel (R) Model 353 Histograms device driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (jffs2 filesystem) readonly.
Freeing unused kernel memory: 72k freed
/linuxrc: Mounting /mnt/flash... Empty flash at 0x0331b768 ends at 
0x0331b800
Empty flash at 0x04fd6a80 ends at 0x04fd7000
Empty flash at 0x04fd88a8 ends at 0x04fd9000
done
/linuxrc: Starting init.
init: starting up.
Starting system initialization.

Axis Linux, http://developer.axis.com/
Copyright (C) 2000-2007 Axis Communications AB

Elphel (R) Model 353 Camera release 8.0.5.1

 * Mounting filesystems...                                              
[ ok ]
 * Initializing /var...
JFFS2 notice: (602) check_node_data: wrong data CRC in data node at 
0x04[ ok ]:.
 * Determining MAC address...
    + using saved MAC address: 00:0E:64:08:0C:43                        
[ ok ]
 * Initializing random number generator...                              
[ ok ]
 * Setting hostname...
    + hostname: "Elphel353"                                             
[ ok ]
 * Initializing volatile resolver configuration...                      
[ ok ]
 * Setting FPGA master clock to 160 MHz...                              
[ ok ]
 * Programming FPGA with /etc/x353.bit...                               
[ ok ]
 * Loaded FPGA rev...                                                   
[ 35340]
 * Adjusting DDR SDRAM clock phase...                                   
[ PH 0/]
 * Turn on xtall output (12MHz) to FPGA...                              
[ ok ]
 * Some CMOS-based sensor board attached...                             
[ assum]
 * Configure broadcast ping...                                          
[ ok ]
System initialization is done.
/bin/sh: can't access tty; job control turned off
# New runlevel: 3
 * Starting respawn daemon...                                           
[ ok ]
 * Starting system and kernel logger...
Jan  1 00:00:25 Elphel353 syslogd 1.4.1: restart.
    + system logger started
    + kernel logger started                                             
[ ok ]
 * Bringing lo up...                                                    
[ ok ]
 * Bringing eth0 up...
eth0: changed MAC to 00:0E:64:08:0C:43
    + hardware address: 00:0E:64:08:0C:43
    + media: auto
    + eth0 going up
eth0: changed MAC to 00:0E:64:08:0C:43
    + IPv4 on eth0
    + boot protocol: none
    + IP address: 192.168.10.140
    + netmask: 255.255.255.0
    + broadcast address: 192.160.10.255
    + default IPv4 gateway: 192.180.10.1
RTNETLINK answers: Network is unreachable
    + done                                                              
[ ok ]
 * Waiting for a network interface...
    + eth0 is up                                                        
[ ok ]
 * Starting ipsetd...
Jan  1 00:00:27 Elphel353 ipsetd[702]: Timeout in 120 s.
Jan  1 00:00:27 Elphel353 ipsetd[702]: Expecting echo request payload 
408 bytes.
Jan  1 00:00:27 Elphel353 ipsetd[702]: On echo request arrival, execute 
[ ok ]p.
 * Starting telnet server...
telnetd: starting
  port: 23; interface: any; login program: /bin/login;
  maximum number of allowed simultaneous clients: unlimited             
[ ok ]
 * Starting ftp server...
Jan  1 00:00:28 Elphel353 vftpd[708]: Starting vftpd 0.01
Jan  1 00:00:28 Elphel353 vftpd[709]: qos_setup_socket: unsupported AF  
[ ok ]
 * Starting ssh server...
Jan  1 00:00:28 Elphel353 dropbear[720]: Running in background          
[ ok ]
 * Starting mii-diag...                                                 
[ ok ]
 * Starting lighttpd web server...                                      
[ ok ]
 * Starting image server on port 8081, making Exif...                   
[ ok ]
 * Flushing JFFS2 (sync)...                                             
[ ok ]
 * Starting autocampars daemon...                                       
[ ok ]
 * Starting autoexposure daemon...
/etc/rc3.d/S98sync.sh: 9: /usr/local/sbin/autoexposure: not found       
[ ok ]
 * Starting ccamftp daemon...                                           
[ ok ]
 * initializing camera/sensor parameters...
arch/cris/arch-v32/drivers/elphel/framepars.c:341:initGlobalPars 
GLOBALPARS(G_D0
sensor clock set to 20000000
removing MRST from the sensor
trying MT9P001
Found MT9P001 2592x1944 sensor, chip ID=1801
trying MT9X001
Resetting MT9X001 sensor
Reading sensor registers to the shadows:
Initializing MT9X001 registers with default values:                     
[ ok ]
 * Setting time from NTP server...                                     [ 
unavai]
 * Looking for I/O board...                                             
[ 10369]
ETRAX FS IOP USB Host Controller version 1.10 (c) 2004, 2005, 2006      
Axis CoB
crisv32_hc crisv32_hc.0: ETRAX FS IOP USB Host Controller
crisv32_hc crisv32_hc.0: new USB bus registered, assigned bus number 1
crisv32_hc crisv32_hc.0: irq 51, io base 0x00000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
crisv32_hc crisv32_hc.0: ETRAX FS IOP USB Host Controller
usbcore: registered new interface driver snd-usb-audio
usbcore: registered new interface driver snd-usb-caiaq
 * Initializing USB hub...                                              
[ ok ]
 * Setting system time from CMOS clock...
usb 1-1: new full speed USB device using crisv32_hc and address 2
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected                                           
[ Sun O]
 * Starting video streamer...                                           
[ ok ]
 * Starting compas/GPS...                                               
[ none ]
launcher: nothing to launch
All scripts for runlevel 3 done in 70.42s.

==========================

When I now do "cat /proc/partitions "

I get:
major minor  #blocks  name

   3     0  156290904 hda
   3     1  156288321 hda1
  31     0     131072 mtdblock0
  31     1        256 mtdblock1
  31     2       7936 mtdblock2
  31     3      24576 mtdblock3
  31     4      81920 mtdblock4
  31     5      12288 mtdblock5


===================


I then use fdisk to create a new primary partition with the entire HDD 
space:
The partition table has been altered!

Calling ioctl() to re-read partition table
hda: status timeout: status=0xd0 { Busy }
ide: failed opcode was: unknown
hda: no DRQ after issuing MULTWRITE_EXT
ide0: reset: success
fdisk: WARNING: rereading partition table failed, kernel still uses old 
table: t

 
=====================

I now try to format with ext2:

# mkfs.ext2 /dev/hda1
mke2fs 1.38 (30-Jun-2005)
mkfs.ext2: Could not determine if /dev/hda1 is mounted
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
19546112 inodes, 39072080 blocks
1953604 blocks (5.00%) reserved for the super user
First data block=0
1193 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 
2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables:    8/1193

it gets stuck at 8/1193 now and after waiting some time I get more error 
reports:

Writing inode tables: hda: lost interrupt
hda: status timeout: status=0xd0 { Busy }
ide: failed opcode was: unknown
hda: no DRQ after issuing MULTWRITE_EXT
ide0: reset: success
hda: status timeout: status=0xd0 { Busy }
ide: failed opcode was: unknown
hda: no DRQ after issuing MULTWRITE_EXT
ide0: unexpected interrupt, status=0xd0, count=2
ide0: reset: success
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
......


The camera does not repond to commands anymore now

Regards Sebastian





More information about the Support-list mailing list