diff options
author | Rajat Jain <rajatja@google.com> | 2018-04-27 02:43:50 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-09-28 07:57:26 +0200 |
commit | 9a098a89df79e4cc5e743d7d4acf42bdbcc32ee7 (patch) | |
tree | 9fbae686783cc09c1e440c47030560d0cb696dc8 /drivers | |
parent | iwlwifi: pcie: tx: pull tracing out of iwl_fill_data_tbs() (diff) | |
download | linux-9a098a89df79e4cc5e743d7d4acf42bdbcc32ee7.tar.xz linux-9a098a89df79e4cc5e743d7d4acf42bdbcc32ee7.zip |
iwlwifi: pcie: Fail fast if HW is inaccessible at probe
If the HW is not responding at probe time, fail immediately complaining
about it. Without this, we see that the kernel spends > 100ms trying to
load firmware (even gives an incorrect impression that it actually
loaded a firmware) and do unnecesary processing before concluding that
the device is not accessible:
INFO kernel: [ 34.092678] iwlwifi 0000:01:00.0: enabling device (0000 -> 0002)
WARNING kernel: [ 34.093560] iwlwifi 0000:01:00.0: Direct firmware load for iwl-dbg-cfg.ini failed with error -2
INFO kernel: [ 34.111523] iwlwifi 0000:01:00.0: loaded firmware version 17.318154.0 op_mode iwlmvm
INFO kernel: [ 34.173250] iwlwifi 0000:01:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0xFFFFFFFF
ERR kernel: [ 34.198023] iwlwifi 0000:01:00.0: iwlwifi transaction failed, dumping registers
ERR kernel: [ 34.198044] iwlwifi 0000:01:00.0: iwlwifi device config registers:
Signed-off-by: Rajat Jain <rajatja@google.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index ab0a5a663a6d..a5f51018029a 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -3318,6 +3318,12 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, iwl_disable_interrupts(trans); trans->hw_rev = iwl_read32(trans, CSR_HW_REV); + if (trans->hw_rev == 0xffffffff) { + dev_err(&pdev->dev, "HW_REV=0xFFFFFFFF, PCI issues?\n"); + ret = -EIO; + goto out_no_pci; + } + /* * In the 8000 HW family the format of the 4 bytes of CSR_HW_REV have * changed, and now the revision step also includes bit 0-1 (no more |