![]() |
How to force N900 detect SD manually?
I think it's some sort of sensor failure that it doesn't detect my SD (used to work and test it on my laptop so it's not SD fault) also when i wrote in terminal dmesg | grep mmc0 shows: cover is open ,card is now inaccessible but at the same time the camera cover works and also checked the magnet.it's not a big problem but just want it use as swap and i am not gonna fix it,it's 4 years old n900.so is there anyway to force detect or disable sensor so i can mount and umount manually from terminal or gconf? thanks.
|
Re: How to force N900 detect SD manually?
Since noone else has answered, ..
Access to the SD card is blocked in that situation by the omap_hsmmc kernel module, which seems weird being non-configurable. Luckily it's a software limitation and not a hardware one, so it can be fixed by replacing that module .. I've got it to work in a newer kernel by modifying a single line in mmc/host/omap_hsmmc.c: Code:
int ret; |
Re: How to force N900 detect SD manually?
@Maxdamantus: thanks a lot for that information.
@Pali: any chance of adding a kernel parameter kernel-power for this? This way one could, at his own risk, set-up an u-boot entry with this parameter to use as/when needed. 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). So the module parameter could be set from the kernel command line or directly on the script loading the module (like "/etc/default/unmount_sd_when_cover_off" having "true" or "false"). |
Re: How to force N900 detect SD manually?
Quote:
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 */ 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. |
Re: How to force N900 detect SD manually?
Quote:
Being a module loaded from an init script makes it much easier to tweak, as long as the module supports tweaking, which would be my request to Pali (or to you, seeing that you've pulled this off actually :). Quote:
|
Re: How to force N900 detect SD manually?
Quote:
|
Re: How to force N900 detect SD manually?
This would be a brilliant toggle for those of us who want to use SD swap but have had problems with dropping the phone and causing file system damage when swap is unmounted.
I would love flopswap to have this option available if/when KP with this add-on is detected. |
Re: How to force N900 detect SD manually?
Hello dear gurus plz i have no programming knowledge but i am eager to have the sd card work on my phone. Plz can u give us who are dummy and are willing to have this a step-by-step tutorial on how to modify the config?.
Thanks in advance for your help |
Re: How to force N900 detect SD manually?
Quote:
Code:
$ uname -r I'd then suggest moving the original module, located at `/lib/modules/2.6.28.10-cssu1/omap_hsmmc.ko` somewhere before replacing it with the one in my earlier post. I wouldn't really suggest this if you don't understand what's happening, unless the sensor actually doesn't work (so you see the "cover is open" message in dmesg, mentioned by the first poster). |
Re: How to force N900 detect SD manually?
Quote:
uname -r 2.6.28.10-power53 |
All times are GMT. The time now is 20:16. |
vBulletin® Version 3.8.8