View previous topic :: View next topic |
Author |
Message |
DeIM Guru
Joined: 11 Apr 2006 Posts: 443
|
Posted: Fri Oct 30, 2020 8:10 am Post subject: [solved] SD card reader not working on custom kernel |
|
|
I tried many times to get it working on several kernel versions but it never worked.
Then I saw in dmesg log of live media (e.g. gentoo-based SystemRescueCD or new Arch based one also) it detects it and it worked
Code: | [ 13.467373] sdhci: Secure Digital Host Controller Interface driver
[ 13.467375] sdhci: Copyright(c) Pierre Ossman
[ 13.507868] mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA |
vs my dmesg:
Code: | [ 1.288631] sdhci: Secure Digital Host Controller Interface driver
[ 1.288633] sdhci: Copyright(c) Pierre Ossman |
Code: | # grep -i 8086 /lib/modules/5.9.1-gentoo/modules.* | grep -i 0f14
/lib/modules/5.9.1-gentoo/modules.alias:alias pci:v00008086d00000F14sv*sd*bc*sc*i* sdhci_pci
/lib/modules/5.9.1-gentoo/modules.alias:alias acpi*:80860F14:* sdhci_acpi |
Don't know where I make mistake.
Last edited by DeIM on Mon Nov 22, 2021 5:43 pm; edited 1 time in total |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3685
|
Posted: Fri Oct 30, 2020 8:49 am Post subject: |
|
|
You might want to search the internet for "8086 0F14" and one of the hits might be cateee.net
Are you having those CONFIG options both enabled? |
|
Back to top |
|
|
DeIM Guru
Joined: 11 Apr 2006 Posts: 443
|
Posted: Fri Oct 30, 2020 2:24 pm Post subject: |
|
|
yes:
Code: | # grep SDHC .config
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
CONFIG_MMC_SDHCI_PCI=y
CONFIG_MMC_SDHCI_ACPI=y
# CONFIG_MMC_SDHCI_PLTFM is not set |
Code: | # grep PCI .config
...
CONFIG_PCI=y
... |
|
|
Back to top |
|
|
grumblebear Apprentice
Joined: 26 Feb 2008 Posts: 204
|
Posted: Sun Nov 01, 2020 9:23 am Post subject: |
|
|
First, try to build those as modules insted of having them compiled in. If they do not get loaded automatically, you can at least try to modprobe them and see what happens. |
|
Back to top |
|
|
DeIM Guru
Joined: 11 Apr 2006 Posts: 443
|
Posted: Fri Nov 20, 2020 1:35 pm Post subject: |
|
|
Tried to compile as modules. No change. Those are loaded automatically:
Code: | sdhci_acpi 24576 0
sdhci 61440 1 sdhci_acpi |
tried to load sdhci_pci and unload sdhci_acpi also.
Maybe ADMA which uses another media? |
|
Back to top |
|
|
theotherjoe Guru
Joined: 22 Nov 2003 Posts: 393
|
Posted: Fri Nov 20, 2020 2:31 pm Post subject: |
|
|
anything in dmesg output that gives a hint
about what is going wrong? |
|
Back to top |
|
|
DeIM Guru
Joined: 11 Apr 2006 Posts: 443
|
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
DeIM Guru
Joined: 11 Apr 2006 Posts: 443
|
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3685
|
Posted: Sun Dec 13, 2020 10:08 am Post subject: |
|
|
DeIM wrote: | Is it possible that ADMA is somehow missing in my kernel config?
If so, where is it located since I can't see it anywhere. |
Have you tried Code: | cd /usr/src/<your kernel>
su -c "make menuconfig"
Then read the very first line on top saying »Press [...], </> for Search.«
|
|
|
Back to top |
|
|
DeIM Guru
Joined: 11 Apr 2006 Posts: 443
|
Posted: Mon Jan 18, 2021 6:54 pm Post subject: |
|
|
Yes, I used searching before. But the most relevant I found was:
Code: | │ Symbol: INTEL_IOP_ADMA [=n]
│ Type : tristate
│ Defined at drivers/dma/Kconfig:313
│ Prompt: Intel IOP32x ADMA support
│ Depends on: DMADEVICES [=y] && (ARCH_IOP32X || COMPILE_TEST [=n])
│ Location:
│ -> Device Drivers
│ (2) -> DMA Engine support (DMADEVICES [=y])
│ Selects: DMA_ENGINE [=y] && ASYNC_TX_ENABLE_CHANNEL_SWITCH [=n] |
I think I'll give sys-kernel/gentoo-kernel-bin a try to see if it differ. |
|
Back to top |
|
|
DeIM Guru
Joined: 11 Apr 2006 Posts: 443
|
Posted: Thu Oct 28, 2021 5:14 pm Post subject: |
|
|
I've just created installation on Flash disk with kernel and initrd generated by genkernel.
After boot of same version of kernel I can see sdcard and I can insert and mount SD cards.
Still don't know how to achieve the same with manually configured kernel. I've tried to enable many modules.
Is there a chance it must be included and loaded by initrd? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5361 Location: Bavaria
|
Posted: Thu Oct 28, 2021 5:55 pm Post subject: |
|
|
DeIM wrote: | Still don't know how to achieve the same with manually configured kernel. I've tried to enable many modules. |
If your initrd is able to bring up a working SD card reader you must have all needed modules in your kernel, so you must be able to achieve the same with a manually configured kernel.
I recommend to work with the help function in your "make menuconfig".You will get there the most interesting informations:
1.) The NAME of the module
2.) which module depends on other modules,
3.) which modules selects other modules and
4.) which module was enabled/selected by another module.
An example is the first entry in "Device Drivers -> [*] MMC/SD/SDIO card support". It depends on
Code: | CONFIG_MMC_BLOCK:
[helptext]
Symbol: MMC_BLOCK [=y]
Type : tristate
Defined at drivers/mmc/core/Kconfig:37
Prompt: MMC block device driver
Depends on: MMC [=y] && BLOCK [=y] |
This one doesnt have a
Code: | Selects:
Selected by [n]: |
First you should do: Decide if you want to have them static in your kernel or as module. The do ALL as module OR static (no mismatch; only options which are not able to get in as module you can mismatch).
Second: get a list of your modules with "lsmod".
Delete all modules from your list, you know they doesnt have any clue to your SD cardreader.
So you will have maybe 4 or 7 modules left (maybe some modules which are not related to your SD; but this you will find out).
Search them with / in your make menuconfig. Then go into the HELP and read. If you dont find a module with / you know this module depends on another one and will be only visible if you enabled the other one. After a while of searching you have found them all ... even these which are at first sight invisible. You can also use "z" (toggle-function) to see invisible modules.
Good Luck,
Peter |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5361 Location: Bavaria
|
Posted: Thu Oct 28, 2021 6:09 pm Post subject: |
|
|
P.S.: Do the "lsmod" AFTER you inserted a SD card and after you WORKED with the SD card ... |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54801 Location: 56N 3W
|
Posted: Thu Oct 28, 2021 6:39 pm Post subject: |
|
|
pietinger,
Its also possible to do and see what makes the card reader non operational.
rmmod is a bit more brutal. It will remove modules that are in use too.
Its a very bad thing to remove the kernel module for your video card, or hard drives, so don't do that.
lsmod lists modules in module load order with the first loaded module at the bottom of the list.
If modprobe -r fails because the module is in use, its either used by the kernel or something further up the list. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5361 Location: Bavaria
|
Posted: Thu Oct 28, 2021 8:27 pm Post subject: |
|
|
Neddy,
thank you very much again, especially this is very helpful:
NeddySeagoon wrote: | lsmod lists modules in module load order with the first loaded module at the bottom of the list. |
... bottom ... bottom ... NOT top ... aaaarggghhh
Many greetings,
Peter |
|
Back to top |
|
|
DeIM Guru
Joined: 11 Apr 2006 Posts: 443
|
Posted: Mon Nov 22, 2021 5:43 pm Post subject: |
|
|
Thanks very much for guidelines. I must be stupid cause I was unable to make it work modifying the configuration.
I discovered the last difference - dw_dmac which provides ADMA for mmc, I suppose, didn't loaded at all. It was in config. Tried modules and built-in also. Nothing worked. I spend no little time with it...
Then I decided to make VV approach - I put working config and tried to put away things laptop don't use. Now I have everything working.
Many thanks to You all - I'm closing it finally |
|
Back to top |
|
|
|