summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
diff options
context:
space:
mode:
authorRajat Jain <rajatja@google.com>2017-08-17 12:05:12 -0700
committerLuca Coelho <luciano.coelho@intel.com>2017-10-06 15:22:27 +0300
commita6d24fad00d98e28841b1f39965fda530df637df (patch)
tree06ac9d40d63a93371143e2c2d1d3bd4c44862dcc /drivers/net/wireless/intel/iwlwifi/pcie/internal.h
parent1e37f79945b0b837a2d8c56560e18c7be61ea665 (diff)
iwlwifi: pcie: dump registers when HW becomes inaccessible
We conclude the HW became inaccessible when we timeout waiting for a bit to be set in a memory mapped register (CSR_GP_CNTRL). This conclusion may not be true because the bit may not get set due to: - a firmware issue - a driver issue - a PCI bus issue - a platform issue There are a lot of such reports with really no good debug information beyond this message to help us. Add some debug information and attempt to dump the different register spaces at such a failure: * Dump some configuration space of device - this will tell us if something very basic is broken in the PCIe bus (so that configuration accesses are failing). If this works, the PCIe bus seems OK. If this does not work, it is definitely an PCIe issue. * Dump some memory mapped registers - if we're reading some sane'ish values, this will tell us that the PCIe bus is OK, but may be a firmware / driver issue. If this does not work, it may be a PCI configuration issue or a driver/firmware issue. * Dump parent and device's AER registers, will give us some straws to chew on. This is the sample output: [ 13.082651] ------------[ cut here ]------------ [ 13.086791] iwlwifi 0000:01:00.0: iwlwifi transaction failed, dumping registers [ 13.086793] iwlwifi 0000:01:00.0: iwlwifi device config registers: [ 13.086893] iwlwifi 0000:01:00.0: 00000000: 095a8086 00100406 02800059 00000000 00000004 00000000 00000000 00000000 [ 13.086895] iwlwifi 0000:01:00.0: 00000020: 00000000 00000000 00000000 50108086 00000000 000000c8 00000000 00000100 [ 13.086901] iwlwifi 0000:01:00.0: iwlwifi device memory mapped registers: [ 13.086989] iwlwifi 0000:01:00.0: 00000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff [ 13.086991] iwlwifi 0000:01:00.0: 00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff [ 13.086999] iwlwifi 0000:01:00.0: iwlwifi device AER capability structure: [ 13.087033] iwlwifi 0000:01:00.0: 00000000: 14010001 00100000 00000000 00462031 00002000 00002000 00000014 40000001 [ 13.087034] iwlwifi 0000:01:00.0: 00000020: 0000000f d140000c 00000000 [ 13.087036] iwlwifi 0000:01:00.0: iwlwifi parent port (0000:00:1c.0) config registers: [ 13.087074] iwlwifi 0000:00:1c.0: 00000000: 9d108086 00100506 060400f1 00810010 00000000 00000000 00010100 200000f0 [ 13.087075] iwlwifi 0000:00:1c.0: 00000020: d140d140 0001fff1 00000000 00000000 00000000 00000040 00000000 0006010b [ 13.087087] ------------[ cut here ]------------ [ 13.087095] WARNING: CPU: 0 PID: 1759 at drivers/net/wireless/iwl7000/iwlwifi/pcie/trans.c:2082 iwl_trans_pcie_reclaim+0x1ee4/0x2b9a [iwlwifi]() [ 13.087096] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff) Signed-off-by: Rajat Jain <rajatja@google.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/pcie/internal.h')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
index 9caff1ec29e1..d749abeca3ae 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
@@ -443,6 +443,7 @@ struct iwl_trans_pcie {
bool bc_table_dword;
bool scd_set_active;
bool sw_csum_tx;
+ bool pcie_dbg_dumped_once;
u32 rx_page_order;
/*protect hw register */