View Single Post
Posts: 14 | Thanked: 69 times | Joined on Jan 2015 @ New Zealand
#4
Originally Posted by reinob View Post
Oh, I just noted that omap_hsmmc is an actual module (not built-in the kernel), so this parameter could be set in /etc/init.d/ke-recv (and optionally in softupd.rcS).
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.

Last edited by Maxdamantus; 2015-01-20 at 13:03.
 

The Following 9 Users Say Thank You to Maxdamantus For This Useful Post: