forked from Minki/linux
debff6184c
For testing the D3 (WoWLAN) firmware, it is useful to be able to run the firmware with instrumentation while the host isn't sleeping and can poke at the firmware debug logging etc. Implement this by a debugfs file. When the file is opened the D3 firmware is loaded and all regular commands are blocked. While the file is being read, poll the firmware's PME status flag and report EOF once it changes to non-zero. When it is closed, do (most of) the resume processing. This lets a user just "cat" the file. Pressing Ctrl-C to kill the cat process will resume the firwmare as though the platform resumed for non-wireless reason and when the firmware wants to wake up reading from the file automatically completes. Unlike in real suspend, only disable interrupts and don't reset the TX/RX hardware while in the test mode. This is a workaround for some interrupt problems that happen only when the PCIe link isn't fully reset (presumably by changing the PCI config space registers which the core PCI code does.) Note that while regular operations are blocked from sending commands to the firmware, they could still be made and cause strange mac80211 issues. Therefore, while using this testing feature you need to be careful to not try to disconnect, roam or similar, and will see warnings for such attempts. Als note that this requires an upcoming firmware change to tell the driver the location of the PME status flag in SRAM. D3 test will fail if the firmware doesn't report the pointer. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> |
||
---|---|---|
.. | ||
binding.c | ||
bt-coex.c | ||
d3.c | ||
debugfs.c | ||
fw-api-bt-coex.h | ||
fw-api-d3.h | ||
fw-api-mac.h | ||
fw-api-power.h | ||
fw-api-rs.h | ||
fw-api-scan.h | ||
fw-api-sta.h | ||
fw-api-tx.h | ||
fw-api.h | ||
fw.c | ||
led.c | ||
mac80211.c | ||
mac-ctxt.c | ||
Makefile | ||
mvm.h | ||
nvm.c | ||
ops.c | ||
phy-ctxt.c | ||
power.c | ||
quota.c | ||
rs.c | ||
rs.h | ||
rx.c | ||
scan.c | ||
sta.c | ||
sta.h | ||
time-event.c | ||
time-event.h | ||
tt.c | ||
tx.c | ||
utils.c |