Release context when trying to load atwilc1000 driver on nvidia tx2

Hi all,

I tryied to load the wilc1000 driver on a tx2 custom device and got the followinf log:

root@nvidia-desktop:~# modprobe -vvv wilc-sdio 
modprobe: INFO: ../libkmod/libkmod.c:364 kmod_set_log_fn() custom logging function 0x558aa9e458 registered
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.9.140-tegra/modules.dep.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.9.140-tegra/modules.alias.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.9.140-tegra/modules.symbols.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.9.140-tegra/modules.builtin.bin
modprobe: DEBUG: ../libkmod/libkmod-module.c:556 kmod_module_new_from_lookup() input alias=wilc-sdio, normalized=wilc_sdio
modprobe: DEBUG: ../libkmod/libkmod-module.c:562 kmod_module_new_from_lookup() lookup modules.dep wilc_sdio
modprobe: DEBUG: ../libkmod/libkmod.c:574 kmod_search_moddep() use mmaped index 'modules.dep' modname=wilc_sdio
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='wilc_sdio' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x55c5fbaef0 key='wilc_sdio'
modprobe: DEBUG: ../libkmod/libkmod-module.c:202 kmod_module_parse_depline() 0 dependencies for wilc_sdio
modprobe: DEBUG: ../libkmod/libkmod-module.c:583 kmod_module_new_from_lookup() lookup wilc_sdio=0, list=0x55c5fbb000
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=wilc_sdio
modprobe: DEBUG: ../libkmod/libkmod-module.c:1750 kmod_module_get_initstate() could not open '/sys/module/wilc_sdio/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1760 kmod_module_get_initstate() could not open '/sys/module/wilc_sdio': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_pcsp mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_usb_audio mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=cx88_alsa mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_atiixp_modem mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_intel8x0m mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_via82xx_modem mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=bt87x mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=cx88_alsa mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=saa7134_alsa mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_atiixp_modem mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_intel8x0m mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_via82xx_modem mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_usb_audio mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_usb_caiaq mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_usb_ua101 mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_usb_us122l mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_usb_usx2y mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_cmipci mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_pcsp mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_usb_audio mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=bonding mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=dummy mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=net mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=usbcore mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=boot mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=boot mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=sdhci_tegra mod->name=wilc_sdio mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1750 kmod_module_get_initstate() could not open '/sys/module/wilc_sdio/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1760 kmod_module_get_initstate() could not open '/sys/module/wilc_sdio': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:744 kmod_module_get_path() name='wilc_sdio' path='/lib/modules/4.9.140-tegra/kernel/drivers/staging/mchp/wilc-sdio.ko'
modprobe: DEBUG: ../libkmod/libkmod-module.c:744 kmod_module_get_path() name='wilc_sdio' path='/lib/modules/4.9.140-tegra/kernel/drivers/staging/mchp/wilc-sdio.ko'
insmod /lib/modules/4.9.140-tegra/kernel/drivers/staging/mchp/wilc-sdio.ko 
modprobe: DEBUG: ../libkmod/libkmod-module.c:744 kmod_module_get_path() name='wilc_sdio' path='/lib/modules/4.9.140-tegra/kernel/drivers/staging/mchp/wilc-sdio.ko'
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x55c5fbaef0 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x55c5fbaef0 key='wilc_sdio'
modprobe: INFO: ../libkmod/libkmod.c:331 kmod_unref() context 0x55c5fba480 released

Do you know why the driver is being released? Maybe a mmc or sdhci conflict between the modules being used?

How could I disable the others mmc module in a such way to enable only the mmc1 interface?

Thanks and best regards,

Are you sure these two have nothing to do with the release?

modprobe: DEBUG: ../libkmod/libkmod-module.c:1750 kmod_module_get_initstate() could not open '/sys/module/wilc_sdio/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1760 kmod_module_get_initstate() could not open '/sys/module/wilc_sdio': No such file or directory

Hi WayneWWW,

Actually the directory exists:

nvidia@nvidia-desktop:~$ cd /sys/module/wilc_sdio/
nvidia@nvidia-desktop:/sys/module/wilc_sdio$ ls
coresize  holders  initsize  initstate  notes  refcnt  sections  taint  uevent

maybe the file does not have the correct permission to get open …

-r--r--r--   1 root root 4096 dez 27 07:54 initstate

I’ll try to get all the permissions (777) and see what happens ok?

Thanks for the help!

Hi rtakaki,

Have you managed to get issue resolved?
Any result can be shared?