Compactflash (Sandisk 512) hangs on access

From: Prashant (vprashant_at_gmail.com)
Date: 01/28/05


Date: 27 Jan 2005 16:29:33 -0800

I have been trying unsuccessfully over the last 2 weeks to get
compactflash working on my Linux system based on mini-ITX (Via CL
motherboard, pentium compatible).

I use a CF->IDE adapter to access it just like a IDE hard disk. My
compactflash is Sandisk SDCFH-512. Linux can detect it. I can even
mount it and do a fdisk on it. However, the moment I try to do
anything substantial like copy multiple files or copy 1000 blocks
using dd, I lose access to it. Linux loses access to it totally. I
can't even do a fdisk on it. I get an error like "Unable to open
/dev/hdc".

I have looked at newsgroups and tried the following things
* Used another CF (same brand) to make sure it wasn't due to a bad CF.
Moreover I can access it perfectly well using a USB flash
reader/writer (shows up as a SCSI disk).
* Tried a compactflash from another manufacturer.
* Upgraded my Linux kernel from 2.4.26 to 2.6.7
* Disabled DMA on the IDE drive using hdparm
* Built and used kernels with and without devfs.
* Used compactflash as a slave on the IDE channel, as a master and on
both primary and secondary channels.

I get errors like (from dmesg)
"hdc: irq timeout: status=0xff { Busy }" (no dma)
or
"hdc: lost interrupt" (when i had dma enabled)

Is there some nasty race condition that I am hitting?

Also, now I can't seem to turn dma back on.

<snip>

everest root # hdparm -d1 /dev/hdc

/dev/hdc:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
</snip>

I would appreciate any help/suggestions/pointers.
Thanks a lot in advance for reading through this and any help.
Prashant



Relevant Pages

  • Compactflash (Sandisk 512) hangs on access
    ... compactflash working on my Linux system based on mini-ITX (Via CL ... I use a CF->IDE adapter to access it just like a IDE hard disk. ... Linux can detect it. ... Disabled DMA on the IDE drive using hdparm ...
    (Linux-Kernel)
  • Re: Compactflash (Sandisk 512) hangs on access
    ... Prashant wrote: ... > compactflash working on my Linux system based on mini-ITX (Via CL ... Linux can detect it. ... > * Used compactflash as a slave on the IDE channel, ...
    (comp.os.linux.hardware)
  • Re: Compactflash (Sandisk 512) hangs on access
    ... Prashant wrote: ... > compactflash working on my Linux system based on mini-ITX (Via CL ... Linux can detect it. ... USB adapters usually use a different mode. ...
    (comp.os.linux.hardware)
  • Re: CD writing in future Linux (stirring up a hornets nest)
    ... for Linux and for this reason, Linux cannot yet be called mature. ... supports DMA unilaterally. ... for an abstraction layer do not for various reasons. ... But as the kernel progresses through 2.6 you will ...
    (Linux-Kernel)
  • Re: Starting with Linux
    ... My experience level with SUSE Linux is about zip but the min requirements ... setting the DMA does not work. ... hard drives - including some older SCSI drives I plan to test. ...
    (alt.os.linux.suse)