Compact Flash Cards with removable/non-removable bit set.

Robert Thomas Davis rdavisunr at yahoo.com
Tue Sep 20 14:48:54 PDT 2005


Gentlemen

Background:
Running single board computer with hardrive on first
IDE and compact flash on second IDE.  Using,
kernel-2.6.12-1.1372_FC3, hal-0.4.0-10, udev-039-8.FC3
and hotplug-2004_04_01-6.

Mission:
I would like to be able to plug any type of compact
flash card (any manufacturer, removable or
non-removable flag set) and have the card always
appear in /media as "idedisk".  Also, any user should
be able to mount and have full access to the card.

Status:
I am currently 1/3 of the way there.  I have a sandisk
compact flash card (version 101 firmware revision: Vdg
1.25) that works in this manner (removable flag set). 


I have another Sandisk compact flash card (version 202
firmware revision HDX 2.15) that does NOT appear in
/media (I believe because non-removable flag is set).

My last CF card is a toshiba that does appear in
/media but is listed as TOSHIBA128xxx (again I would
like to have it listed as idedisk).

I have attached a .fdi file I created as a starting
point as well as the results of running hdparm -I
against the two sandisk compact flash cards.  Any help
you guys could provide would be great

/usr/share/hal/fdi/95userpolicy/cf-policy.fdi:

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*-
SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="block.is_volume" bool="true">
      <match key="volume.fsusage" string="filesystem">
          <match key="volume.fstype" string="vfat">
                <merge
key="volume.policy.mount_option.user"
type="bool">true</merge>
                <merge
key="volume.policy.mount_option.umask=0000"
type="bool">true</merge>
          </match>
      </match>
    </match>
  </device>
</deviceinfo> 

THIS ONE WORKS:
/dev/hdd:

CompactFlash ATA device, with removable media
	Model Number:       SanDisk SDCFB-256                
      
	Serial Number:      101804L1702R1349
	Firmware Revision:  Vdg 1.25
Standards:
	Likely used: 4
Configuration:
	Logical		max	current
	cylinders	980	980
	heads		16	16
	sectors/track	32	32
	--
	bytes/track: 0	bytes/sector: 576
	CHS current addressable sectors:     501760
	LBA    user addressable sectors:     501760
	device size with M = 1024*1024:         245 MBytes
	device size with M = 1000*1000:         256 MBytes 
Capabilities:
	LBA, IORDY(may be)(cannot be disabled)
	Buffer size: 1.0kB	bytes avail on r/w long: 4	Queue
depth: 1
	Standby timer values: spec'd by Vendor
	R/W multiple sector transfer: Max = 1	Current = 0
	DMA: not supported
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=120ns  IORDY flow
control=120ns

THIS ONE DOES NOT WORK:
/dev/hdd:

ATA device, with non-removable media
	Model Number:       SanDisk SDCFB-128                
      
	Serial Number:      103214C0204C5447
	Firmware Revision:  HDX 2.15
Standards:
	Supported: 10 
	Likely used: 10
Configuration:
	Logical		max	current
	cylinders	980	980
	heads		8	8
	sectors/track	32	32
	--
	CHS current addressable sectors:     250880
	LBA    user addressable sectors:     250880
	device size with M = 1024*1024:         122 MBytes
	device size with M = 1000*1000:         128 MBytes 
Capabilities:
	LBA, IORDY(may be)(cannot be disabled)
	Queue depth: 1
	Standby timer values: spec'd by Vendor
	R/W multiple sector transfer: Max = 1	Current = 1
	DMA: not supported
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=120ns  IORDY flow
control=120ns


Thanks again


More information about the hal mailing list