# [Tip]ENE mmc/Sd Reader works

## l1q1d

This little topic explain how i make work this reader.

My lspci is

```
06:04.0 CardBus bridge: ENE Technology Inc CB-712/4 Cardbus Controller (rev 10)

06:04.1 FLASH memory: ENE Technology Inc ENE PCI Memory Stick Card Reader Controller (rev 01)

06:04.2 Generic system peripheral [0805]: ENE Technology Inc ENE PCI Secure Digital Card Reader Controller (rev 01)

06:04.3 FLASH memory: ENE Technology Inc FLASH memory: ENE Technology Inc: (rev 01)

06:04.4 FLASH memory: ENE Technology Inc SD/MMC Card Reader Controller (rev 01)

```

boot option with gentoo-sources-2.6.22

```
pci=routeirq
```

and the patch for 2.6.20 

```
cd /usr/src/linux

wget http://launchpadlibrarian.net/8359982/linux-source-2.6.20_ene_cb712.patch

patch -p1 < linux-source-2.6.20_ene_cb712.patch

```

recompile and rebuild the kernel and then reboot.

you also need in kernel config:

```

CONFIG_MMC=y

# CONFIG_MMC_DEBUG is not set

# CONFIG_MMC_UNSAFE_RESUME is not set

#

# MMC/SD Card Drivers

#

CONFIG_MMC_BLOCK=y

#

# MMC/SD Host Controller Drivers

#

CONFIG_MMC_SDHCI=y

CONFIG_MMC_WBSD=m

CONFIG_MMC_TIFM_SD=m

```

Good lack!!

----------

## HoX

I'm trying to patch the kernel but it give me this error... how can I do?

```
/usr/src/linux #patch -p1 < linux-source-2.6.20_ene_cb712.patch

can't find file to patch at input line 4

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|diff -ruN linux-source-2.6.20/drivers/mmc/host/sdhci.c linux-source-2.6.20-patched/drivers/mmc/host/sdhci.c

|--- linux/drivers/mmc/host/sdhci.c     2007-04-12 19:15:58.000000000 +0200

|+++ linux/drivers/mmc/host/sdhci.c     2007-07-10 20:37:35.000000000 +0200

--------------------------

File to patch: 

```

PS: this is my first kernel patch

----------

## shogun_panda

 *Anema wrote:*   

> I'm trying to patch the kernel but it give me this error... how can I do?
> 
> ```
> /usr/src/linux #patch -p1 < linux-source-2.6.20_ene_cb712.patch
> 
> ...

 

This is strange...

I succeeded applying this patch with your same command.

But, looking at your output, I noticed that the patch has changed slightly, so I suggest you to try again. 

Hope this helps!

----------

## Karmazyn

sorry for my english  :Wink: 

this is answer:

when ask me for "File to patch:" i write "drivers/mmc/sdhci.c"  (this is patch at gentoo-sources-2.6.20)

then i had one patching succeesed and one failed, next to do: 

```
make menuconfig
```

  and exit from them...   now i can set options in kernel_config what say l1q1d,  just open 

```
nano /usr/src/linux/.config
```

 and exchange code lines.

----------

## l1q1d

In the 2.6.23-rc1, -rc2 -rc3 kernel doesn't need to be patched...

----------

