card reader headache

Discussion in 'Linux' started by wraith0x29a, Sep 5, 2008.

  1. wraith0x29a

    wraith0x29a

    Joined:
    Aug 20, 2008
    Messages:
    4
    Likes Received:
    0
    Trying to get the multi card reader working under Debian Lenny on my 512mb* /8GB ssd One.
    *(ok, 1.5GB now I've rammed another 1GB in there)

    Following instructions from another site I use..
    setpci -d 197b:2381 AE=47 ; modprobe pciehp
    ..at boot from /etc/rc.local (have tried with /etc/modprobe.d and /etc/modules doing the same thing too).

    However, I have to do this again (as root) after KDE boots to get the card-reader working (after which it works fine).

    Obviously I'd rather not have to pull up a shell and run this manually but all experiments with KDE Autostart and wrapper
    scripts have failed however recklessly I set suid or sudo settings (though dmesg shows no diffeence from running as root).

    Any pointers as to where I should be looking to tweak something to make this work, I suspect I need to wait until something else stops playing with the PCIE slots used by the card reader before loading the pciehp module but am now lost.

    This is that last headache I have to fix to get this thing working *fully* with Debian lenny so any help appreciated.
     
    wraith0x29a, Sep 5, 2008
    #1
  2. wraith0x29a

    sideways

    Joined:
    Aug 21, 2008
    Messages:
    172
    Likes Received:
    0
    I found it works this way:

    You can modprobe pciehp from /etc/rc.local, but the setpci command must be run with the card inserted then you have to eject the card and reinsert for it to be recognised.

    Also the setpci command only activates the rhs sd reader, to activate the lhs one (storage expansion) you follow the same procedure, (ensure pciehp is loaded first) insert a card and type this (as root)

    Code:
    sudo setpci -d 197b:2382 AE=47
    Then eject the card and reinsert, and voila, it is automounted.

    I tested in Fedora 8, but i assume it's the same in other linux distros.

    If you insert the card before boot it is auto recognised without any additional work.
     
    sideways, Sep 5, 2008
    #2
  3. wraith0x29a

    Dolph

    Joined:
    Sep 5, 2008
    Messages:
    3
    Likes Received:
    0
    Location:
    London, UK
    FWIW, I've added the following lines (for all of the SD-related entries that I could see in "lspci -n") to my rc.local file:

    Code:
    setpci -d 197b:2381 AE=47
    setpci -d 197b:2382 AE=47
    setpci -d 197b:2383 AE=47
    setpci -d 197b:2384 AE=47
    I'm running Fedora 9, and the above is enough to get the "Storage Expansion" slot on the left of the keyboard working as normal without any need for a card to be inserted in advance - once the system's booted and I'm logged in to my Desktop I can insert a card and it's auto-mounted.

    As for the right-hand socket, if I re-run the first setpci command above after the system has finished booting then this socket also works without any need to have a card inserted in advance. I suspect this is just some quirk with my setup, the order of boot events, etc. I keep meaning to look into the cause, but maybe someone else can answer that. ;)
     
    Dolph, Sep 6, 2008
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.