wl1271: how to use without runtime pm
Hello Luciano,
I use omap3evm board with wl1271 extension module. Current version of wl1271 driver works fine on upstream kernel and (with minor modifications resulting from older mac80211) on 2.6.32 kernel with integrated SDIO runtime PM patches from Ohad Ben-Cohen.
In the current kernel runtime PM support is always enabled for omap2plus boards. However this is not the case for the earlier kernels. Besides, on some other boards there might be no gpio pin to control power supply of wl1271 card.
So the question is: what is the proper use of wl1271 driver in the case when wl1271 card is powered all the time ?
In a simple experiment I removed all pm_runtime functions from wl1271_sdio.c and removed MMC_CAP_POWER_OFF_CARD flag from mmc slot settings in board file. However I can't do ifdown/ifup procedure properly:
root@omap3evm_minimal:~# ifconfig wlan0 down root@omap3evm_minimal:~# ifconfig wlan0 up [ 55.313201] wl1271: ERROR timeout waiting for the hardware to complete initialization [ 58.813964] wl1271: ERROR timeout waiting for the hardware to complete initialization [ 60.648651] wl1271: ERROR sdio read failed (-110) [ 60.653686] wl1271: ERROR sdio write failed (-110) [ 62.057067] wl1271: ERROR sdio read failed (-110) [ 62.062072] wl1271: ERROR chip id doesn't match after firmware boot [ 62.068786] wl1271: ERROR firmware boot failed despite 3 retries ifconfig: SIOCSIFFLAGS: Input/output error
It looks like init procedure of wl1271 card can not be done twice without powering off wl1271 card.
Thanks,
Sergey
Quoted 2 lines · Sergey Matyukevich
So the question is: what is the proper use of wl1271 driver in the case when wl1271 card is powered all the time ?
The wl1271 driver assumes it can control the power of the card.
If your card's power is always on, you will not be able to toggle the interface down and up (as you have experienced).
It might be possible to change the driver around this "limitation", but I'm not sure anyone has ever really tried.
Quoted 5 lines · On Wed, 29 Dec 2010 23:22:05 +0200 Ohad Ben-Cohen <[email protected]> wrote:
Quoted 2 lines · Sergey Matyukevich
So the question is: what is the proper use of wl1271 driver in the case when wl1271 card is powered all the time ?
Quoted 7 lines
The wl1271 driver assumes it can control the power of the card.
If your card's power is always on, you will not be able to toggle the interface down and up (as you have experienced).
It might be possible to change the driver around this "limitation", but I'm not sure anyone has ever really tried.
A simple solution which comes to mind would be to perform some kind of 'complete soft reset procedure' for wl1271 card in the beginning of the function 'wl1271_op_add_interface'. But I guess such a feature is not available for this card. Qtherwise it would be already implemented by Luciano and his colleagues.
Thanks,
Sergey
Quoted 13 lines · ext Sergey Matyukevich
Quoted 10 lines · On Wed, 29 Dec 2010 23:22:05 +0200 Ohad Ben-Cohen <[email protected]> wrote:
Quoted 2 lines · Sergey Matyukevich
So the question is: what is the proper use of wl1271 driver in the case when wl1271 card is powered all the time ?
The wl1271 driver assumes it can control the power of the card.
If your card's power is always on, you will not be able to toggle the interface down and up (as you have experienced).
Quoted 8 lines
Quoted 2 lines
It might be possible to change the driver around this "limitation", but I'm not sure anyone has ever really tried.
A simple solution which comes to mind would be to perform some kind of 'complete soft reset procedure' for wl1271 card in the beginning of the function '
wl1271_op_add_interface'. But I guess such a feature is not available for this card. Qtherwise it would be already implemented by Luciano and his colleagues.
I don't know about any reset functionality in the wl1271. Maybe the hardware recovery mechanism could be used, but I'm not sure.
In any case, the reason why we power the card on only when the interface is brought up is because of power consumption. If the interface is down, there's no reason to keep the chip powered on and consume unnecessary power.
If the case of cards that really cannot power off the wl1271 chip is really unavoidable, we could think about a solution to solve the problem.
PS: Note that this is the last day when this email address ([email protected]) is valid, so please keep the linux-wireless mailing list in CC so I can still read the messages. ;)
Signature · 2 lines
Cheers, Luca.
Is there any resolution for this mail thread? I too came across this problem. My H/W has WLAN_EN bit high( a h/w Switch) and Physically can not be configured for RUN-TIME feature. So, I will have to run wl128x compat module without RUN-TIME support.
Could any one suggest workaround for same so that I don't see SDIO WR/RD error for sequence of wireless node down , followed by up (referred in this mail thread).
Appreciate your opinion.