LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SD slot recognition post bootup (https://www.linuxquestions.org/questions/linux-newbie-8/sd-slot-recognition-post-bootup-790662/)

ddu_ 02-21-2010 09:44 PM

SD slot recognition post bootup
 
Hey all, I have a problem I'm struggling to figure out. I have an Acer Aspire One "netbook" that has 2 SD slots. If I insert and try to mount an SD card post bootup it can't detect the card (not listed in fdisk -l, and no messages generated to dmesg). Almost as if the slot isn't functioning.

The weird thing is, if I boot the computer up with the SD card IN the slot, it picks it up no problem, shown in fdisk as /dev/mmcblk0p1, and I am able to mount it no problem. I am also able to unmount and remove the card and the SD slot continues to function normally. Although I can boot up the computer with the SD card in the slot with no issues, I'd like to be able to have that "slot" active on boot even if I don't have a card in it.

A few more details, Im running slackware 13 with fluxbox wm. Any help is appreciated. Thanks!

kilgoretrout 02-22-2010 08:55 AM

Some module is probably not loading when the card is not present at boot time. According to this:

https://help.ubuntu.com/community/AspireOne

It appears to be the pciehp module:

Quote:

pciehp module still missing. All USB ports are hot-pluggable, RH SD works if card is present on boot. LH SD slot has been reported to be hot-pluggable but on some AaO's it is not. As workaround add "pciehp.pciehp_force=1" to defoptions in /boot/grub/menu.lst or to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub if you are already using grub2.
You can try adding the above workaround to your lilo.conf append line and see if it works. If your not sure how to accomplish this, post your /etc/lilo.conf here and I'll walk you through it. You can also try manually loading pciehp after you boot up and see if an sd card is then picked up by running as root:

# modprobe pciehp

then insert sd card and run:

# fdisk -l

ddu_ 02-22-2010 04:14 PM

hrm, I tried manually running modprobe pciehp post boot (without SD card inserted during boot) and fdisk -l doesn't show the SD card. I also tried putting "pciehp.pciehp_force=1" into the append= line in lilo.conf (and reran lilo, saving the changes) and the same results. Looks like that's not solving the problem. Thanks though, any other suggestions?

ddu_ 02-22-2010 05:56 PM

i will add this, when I boot up with the card in the slot, bootup logs show the following:

Quote:

Registered led device: mmc0::
mmc0: SDHCI controller on PCI [0000:04:00.0] using ADMA
sdhci-pci 0000:04:00.2: SDHCI controller found [197b:2381] (rev 0)
sdhci-pci 0000:04:00.2: PCI INT A -> GSI 19 (level, low) -> IRQ 19
sdhci-pci 0000:04:00.2: Refusing to bind to secondary interface.
sdhci-pci 0000:04:00.2: PCI INT A disabled
mmc0: new SDHC card at address b46f
HDA Intel 0000:00:1b.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
HDA Intel 0000:00:1b.0: setting latency timer to 64
mmcblk0: mmc0:b46f SD08G 7.40 GiB
mmcblk0: p1

kilgoretrout 02-24-2010 04:23 PM

See what modules are loading with the card inserted at boot time by running:

$ lspci > lspci.txt

That creates the text file lspci.txt in your home directory and dumps the output of the lspci command to lspci.txt. The lscpi command lists all loaded modules. Then boot without a card inserted and see what modules are loaded by running:

$ lspci

Compare the output with your text file you previously created. It looks like another module is binding to the card reader device(sdhci-pci?) when you boot without the card inserted and it interferes with pciehp when it is later loaded after boot.

ddu_ 02-24-2010 07:41 PM

thanks for following up. Here's the difference with the two outputs (4 additional lines in the with.sd.txt file):

Quote:

04:00.0 System peripheral: JMicron Technology Corp. SD/MMC Host Controller
04:00.2 SD Host controller: JMicron Technology Corp. Standard SD Host Controller
04:00.3 System peripheral: JMicron Technology Corp. MS Host Controller
04:00.4 System peripheral: JMicron Technology Corp. xD Host Controller
I'm not entirely sure what to do from here. Any more help is appreciated!

kilgoretrout 02-26-2010 07:06 AM

Well, you're not alone:

https://bugs.launchpad.net/ubuntu/+s...ux/+bug/258446

Seems like a common problem with that jmicron card reader.

I still think something is interfering with the pciehp module when a card is not present at boot time. Let's test the theory by running lsmod. With the card present, boot up and run as root:

# lsmod > lsmod.txt

and reboot without a card and run:

# lsmod

Compare the output and see what modules are different in the two cases. My guess is that with card present, you will see the pciehp module loaded and without the card you will see sdhci-pci loaded. The sdhci-pci module is a driver for certain card readers but from everything I see your jmicron reader should use the pciehp module. If I'm right, you may be able to work around the problem by blacklisting sdhci-pci and forcing the pciehp module to load instead.


All times are GMT -5. The time now is 04:17 PM.