]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: pcie: avoid unnecessary work if NIC is disconnected
authorMatt Chen <matt.chen@intel.com>
Thu, 19 Apr 2018 07:18:00 +0000 (15:18 +0800)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 31 Aug 2018 08:38:30 +0000 (11:38 +0300)
commit6532d3d718cda9fe9ac37213e864db45acd0210e
tree6f8011cc8acde5cd07452223f33d9d135b672005
parent43b03c8c5f671eb29f5ec7cb69cbde46d6c1d56d
iwlwifi: pcie: avoid unnecessary work if NIC is disconnected

When the NIC is disconnected from PCI bus, we are not
able to access it anymore. Check the status to avoid
some unnecessary work so can improve the performance.
It will help to make PCI bus rescan to bring back the
device much faster.

The real test is able to improve 7 seconds.

[w/o patch] It takes around 9 seconds
..
2018-04-20T01:22:39.691929-07:00 WARNING kernel:
[   66.335881] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff)
..
2018-04-20T01:22:48.101094-07:00 INFO kernel:
[   74.747364] iwlwifi 0000:01:00.0: loaded firmware version 29.610311.0 op_mode iwlmvm

[w/a patch] It takes about 2 seconds.
..
2018-04-20T01:18:16.454087-07:00 WARNING kernel:
[   75.966860] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff)
..
2018-04-20T01:18:18.602717-07:00 INFO kernel:
[   78.116132] iwlwifi 0000:01:00.0: loaded firmware version 29.610311.0 op_mode iwlmvm
..

Fixes: c1e34e75cd4c ("iwlwifi: pcie: remove non-responsive device")
Signed-off-by: Matt Chen <matt.chen@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/trans.c
drivers/net/wireless/intel/iwlwifi/pcie/tx.c