View Single Post
Posts: 65 | Thanked: 42 times | Joined on Jun 2014
#6
Originally Posted by Maxdamantus View Post
I'm not sure how it being a module changes it. Personally, I see it as a misfeature, but it should otherwise be configurable through sysfs, which works whether the code providing it is a module or built-in.

Edit: it should probably also be noted that the card isn't actually unmounted when the cover is removed. It won't even be able to continue flushing the writeback cache. It looks like a "safely remove" feature, but it's not.

Anyway, the 2.6.28.10 version of omap_hsmmc is a bit different, but a similarly hacky modification seems to have worked:
Code:
 /* Protect the card while the cover is open */
 static void omap_hsmmc_protect_card(struct omap_hsmmc_host *host)
 {
-       if (!mmc_slot(host).get_cover_state)
+       if (1 || !mmc_slot(host).get_cover_state)
                return;

        host->reqs_blocked = 0;
I'm not sure about binary module sharing etiquette, but here's the one I'm using with 2.6.28.10-cssu1: https://gist.github.com/Maxdamantus/.../omap_hsmmc.ko

Edit: caveat: with this module as-is, if the SD card is removed, you'll have to reboot before using the slot again. It looks like it does state resetting and stuff when the cover is closed, so someone would need to spend some time doing more than a one-line modification to make it work neatly.
please help me i don't know how to make these mod it is through the terminal? i really need the sd card to work plz
 

The Following User Says Thank You to abdel_95 For This Useful Post: