# PCMCIA compact flash + SD card + Kernel 2.6.29

## rpb

Hi Everybody,

I can mount and read my 32Gb SD card, I can mount my 32Gb compact flash card via my PCMCIA adapter, but I can't do this together.

After I've mounted my CF card, all attempts to access my SD card (or mount it) result in "mmcblk0: retrying using single block read" system messages and then "reading directory /mnt/sd32: Input/output error". The SD card is then not working until I reboot.

This problem started after my upgrade to kernel 2.6.29

Any help would be appreciated.

```

/dev/mmcblk0p1 on /mnt/sd32 type ext4 (rw,nosuid,nodev,noatime)

/dev/hdc1 on /mnt/flash type ext4 (rw,nosuid,nodev,noatime)

```

```

% lsmod                                                        Tuesday 11:27:38

Module                  Size  Used by

ide_cs                  9772  2

i915                  151240  3

mmc_block               9840  2

af_packet              17324  4

snd_pcm_oss            37664  0

snd_mixer_oss          14444  1 snd_pcm_oss

snd_seq_dummy           2512  0

snd_seq_oss            29824  0

snd_seq_midi_event      6828  1 snd_seq_oss

snd_seq                49232  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_usb_audio          80192  0

snd_usb_lib            15724  1 snd_usb_audio

snd_rawmidi            20928  1 snd_usb_lib

snd_seq_device          6776  4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi

snd_hwdep               7088  1 snd_usb_audio

fuse                   53480  0

vboxnetflt             80936  0

vboxdrv               109608  1 vboxnetflt

nfs                   255048  0

auth_rpcgss            36544  1 nfs

lockd                  65932  1 nfs

nfs_acl                 2924  1 nfs

sunrpc                183200  4 nfs,auth_rpcgss,lockd,nfs_acl

i8k                     5892  0

snd_hda_codec_idt      56588  1

snd_hda_intel          23656  0

snd_hda_codec          60588  2 snd_hda_codec_idt,snd_hda_intel

joydev                  9728  0

sdhci_pci               6860  0

sdhci                  15792  1 sdhci_pci

mmc_core               46312  2 mmc_block,sdhci

iwl3945                85156  0

led_class               3376  1 sdhci

snd_pcm                73776  4 snd_pcm_oss,snd_usb_audio,snd_hda_intel,snd_hda_codec

snd_timer              20628  2 snd_seq,snd_pcm

ohci1394               30044  0

psmouse                41148  0

rtc                     6820  0

snd                    56228  13 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_usb_audio,snd_rawmidi,snd_seq_device,snd_hwdep,snd_hda_codec_idt,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer

pcmcia                 33952  1 ide_cs

ieee1394               85364  1 ohci1394

soundcore               7296  1 snd

snd_page_alloc          8692  2 snd_hda_intel,snd_pcm

yenta_socket           23864  3

rsrc_nonstatic          9164  1 yenta_socket

tg3                   108592  0

lib80211                6352  1 iwl3945

pcmcia_core            35456  3 pcmcia,yenta_socket,rsrc_nonstatic

thermal                15208  0

libphy                 21420  1 tg3

processor              39864  3 thermal

button                  5852  0

battery                10000  0

ac                      3952  0

dcdbas                  7244  0

```

```

% grep "PCMCIA" /usr/src/linux/.config                         

# CONFIG_PCMCIA_DEBUG is not set

CONFIG_PCMCIA=m

CONFIG_PCMCIA_LOAD_CIS=y

CONFIG_PCMCIA_IOCTL=y

CONFIG_PARPORT_PC_PCMCIA=m

# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set

# CONFIG_PCMCIA_RAYCS is not set

# CONFIG_PCMCIA_WL3501 is not set

CONFIG_NET_PCMCIA=y

CONFIG_PCMCIA_3C589=m

CONFIG_PCMCIA_3C574=m

# CONFIG_PCMCIA_FMVJ18X is not set

# CONFIG_PCMCIA_PCNET is not set

# CONFIG_PCMCIA_NMCLAN is not set

# CONFIG_PCMCIA_SMC91C92 is not set

CONFIG_PCMCIA_XIRC2PS=m

CONFIG_PCMCIA_AXNET=m

CONFIG_PHONE_IXJ_PCMCIA=m

# PCMCIA character devices

CONFIG_SND_PCMCIA=y

% grep "SD" /usr/src/linux/.config                             

# CONFIG_BSD_PROCESS_ACCT is not set

# CONFIG_ACPI_CUSTOM_DSDT is not set

# CONFIG_KSDAZZLE_DONGLE is not set

CONFIG_BT_HCIBTSDIO=m

CONFIG_BLK_DEV_SD=y

CONFIG_PPP_BSDCOMP=m

# CONFIG_ISDN is not set

# Supported SDMC DM1105 Adapters

# ISDB-T (terrestrial) frontends

# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;

CONFIG_USB_STORAGE_ISD200=y

CONFIG_USB_STORAGE_SDDR09=y

CONFIG_USB_STORAGE_SDDR55=y

# MMC/SD/SDIO Card Drivers

CONFIG_SDIO_UART=m

# MMC/SD/SDIO Host Controller Drivers

CONFIG_MMC_SDHCI=m

CONFIG_MMC_SDHCI_PCI=m

CONFIG_MMC_WBSD=m

# CONFIG_MMC_TIFM_SD is not set

CONFIG_MMC_SDRICOH_CS=m

CONFIG_MSDOS_FS=y

CONFIG_NFSD=m

CONFIG_NFSD_V2_ACL=y

CONFIG_NFSD_V3=y

CONFIG_NFSD_V3_ACL=y

CONFIG_NFSD_V4=y

CONFIG_MSDOS_PARTITION=y

CONFIG_BSD_DISKLABEL=y

```

----------

## rpb

So the SD card gets broken as soon as I insert the PCMCIA adapter with the CF card. Here's the changes in modules:

Before I insert CF card - SD card still works

```

mmc_block            9840  2

mmc_core            46312  2 mmc_block,sdhci

pcmcia                 33952  0

yenta_socket         23864  1

```

After I insert CF card - SD card don't work

```

ide_cs                  9772  1

mmc_block           9840  0

mmc_core           46312  2 mmc_block,sdhci

pcmcia                33952  1 ide_cs

yenta_socket       23864  3

```

----------

## rpb

I found a way to get it working. 

 insert only the SD card

 boot

 mount the SD card

 insert the CF card

 mount the CF card

This way it works, and I have the following modules:

```

ide_cs                  9772  1

mmc_block           9840  2

mmc_core           46312  2 mmc_block,sdhci

pcmcia                33952  1 ide_cs

yenta_socket       23864  3

```

I can then read the SD card, but can't write to it.

----------

