flash cards

James R. Van Zandt jrvz at comcast.net
Wed Mar 29 18:59:01 EST 2006


"Drew Van Zandt" <drew.vanzandt at gmail.com> writes:
>Well, CF shows up as Just Another IDE Drive (provided it's connected
>with an IDE adapter... not sure what drivers are used when it's on a
>USB adapter etc., but I think even then it doesn't get a special
>driver.

How about MMC (Multi Media Card)?  It's almost the same as a Secure
Digital card (and mostly interchangable).  My camera uses either.  I
think the USB connector on that camera has failed, so I would like to
get use of the MMC/SD card reader built into my Dell X-300.  The slot
is immediately below the PCMCIA slot, and apparently connected to it.

I have not used pcmcia cards for the last three years, since the
relevant functions were built-in to the X-300.  Since then, apparently
pcmcia-cs was replaced by pcmciautils and cardmgr was replaced by
hotplug, which in turn was replaced by udev.

I have a 2.6.16 kernel, and a Debian unstable system.  
I just removed hotplug in favor of udev.  

I have reached the point where, when I plug in a card, this gets
printed:
  
  # pccard: PCMCIA card inserted into slot 0
  pcmcia: registering new device pcmcia0.0

and /sys/bus/pcmcia/devices/0.0 appears

I can display some info on the card:
  
  # pccardctl ident
  Socket 0:
    product info: "RICOH", "Bay1Controller", "", ""
    manfid: 0x0000, 0x0000
    function: 254 ((null))
  Socket 1:
    no product info available

Now, how do I access it?  My regular hard disk is /dev/hda.  I don't
find any other IDE disks (/dev/hdb1, /dev/hdc1, etc.) or SCSI disks
(/dev/sda1, /dev/sda2, /dev/sdb1, etc.).

When I insert the MMC card,
this device gets created:

  /dev/.udev/failed/devices at pci0000:00 at 0000:00:1e.0 at 0000:02:03.0 at 0.0

The "failed" in the filename is of course a clue that something is
amiss.  The file is a symlink to a directory in /sys:

  /sys/devices/pci0000:00/0000:00:1e.0/0000:02:03.0/0.0/

  # ls -l /sys/devices/pci0000\:00/0000\:00\:1e.0/0000\:02\:03.0/0.0
  total 0
  --w------- 1 root root    0 2006-03-29 18:21 allow_func_id_match
  lrwxrwxrwx 1 root root    0 2006-03-29 18:21 bus -> ../../../../../bus/pcmcia
  -r--r--r-- 1 root root 4096 2006-03-29 18:26 card_id
  -r--r--r-- 1 root root 4096 2006-03-29 18:26 func_id
  -r--r--r-- 1 root root 4096 2006-03-29 18:26 function
  -r--r--r-- 1 root root 4096 2006-03-29 18:26 manf_id
  -r--r--r-- 1 root root 4096 2006-03-29 18:21 modalias
  -rw-r--r-- 1 root root 4096 2006-03-29 18:26 pm_state
  drwxr-xr-x 2 root root    0 2006-03-29 18:21 power
  -r--r--r-- 1 root root 4096 2006-03-29 18:26 prod_id1
  -r--r--r-- 1 root root 4096 2006-03-29 18:26 prod_id2
  -r--r--r-- 1 root root 4096 2006-03-29 18:26 prod_id3
  -r--r--r-- 1 root root 4096 2006-03-29 18:26 prod_id4
  --w------- 1 root root 4096 2006-03-29 18:26 uevent

The Debian pcmciautils package came with a mini-howto.txt that starts
like this:
  
  Linux Kernel 2.6 PCMCIA - mini-HOWTO
  ====================================
  
     Last update: 08 November 2005.

It mentioned the entries in /sys/bus/pcmcia/devices/0.0 and showed how
to use pccardctl.  It also suggested that udev rules might need some
adaptation - but nothing specific.

I compiled the mmc_core and mmc_block modules and can install them.
Didn't seem to make a difference.

Any suggestions?

               - Jim Van Zandt



More information about the gnhlug-discuss mailing list