rtl8189ES_linux icon indicating copy to clipboard operation
rtl8189ES_linux copied to clipboard

card regulator is not turned off if iface is down

Open akemnade opened this issue 2 years ago • 2 comments

The sdio card is not properly unpowered when device is down. Expectation would be that regulator is powered down when iface isis down. Removing the module helps.

pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# ifconfig wlan0 up
pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# cat supplier/state 
enabled
pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# ifconfig wlan0 down
pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# cat supplier/state 
enabled
pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# rmmod 8189fs
pmos-shine3:/sys/bus/platform/devices/2198000.mmc/supplier:regulator:regulator.2# cat supplier/state 
disabled

Seen on Kobo Clara HD, dtb: imx6sll-kobo-clarahd.dtb (relevant parts are in mainline) module information: commit: 71500c28164369800041d1716ac513457179ce93

It was compiled using

        make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
                KBUILD_BUILD_VERSION="$(( pkgrel + 1 ))-postmarketOS" \
                CONFIG_RTW_SDIO_PM_KEEP_POWER=n \
                -C "$_rtl8189fs_dir" KSRC="$builddir"

akemnade avatar Aug 22 '22 19:08 akemnade

Sorry but this is never an intended behavior to power down the full card when interface is down, because this state means the card is ready to work at any time.

Icenowy avatar Aug 23 '22 03:08 Icenowy

well, other sdio wifi drivers have that behavior. They power down the card completely, in such cases. Also the card does not power down completely if I do some rfkill block. Do you really think the only option the userspace should have to power down the card completely is to remove the driver?!

akemnade avatar Aug 23 '22 06:08 akemnade