ath10k: Retry pci probe on failure.
PATCH 1/1 ath10k: Retry pci probe on failure.
From: Ben Greear <[email protected]>
This works around a problem we see when sometimes the wifi NIC does not respond the first time. This seems to happen especially often on some of the 9984 NICs in mid-range platforms.
--- drivers/net/wireless/ath/ath10k/pci.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +18 -2
@@ -3492,8 +3492,8 @@ static const struct ath10k_bus_ops ath10k_pci_bus_ops = { .get_num_banks = ath10k_pci_get_num_banks, }; -static int ath10k_pci_probe (struct pci_dev *pdev, -const struct pci_device_id *pci_dev) +static int __ath10k_pci_probe (struct pci_dev *pdev, +const struct pci_device_id *pci_dev) {int ret =0 ;struct ath10k *ar;
@@ -3668,6 +3668,22 @@ static int ath10k_pci_probe(struct pci_dev *pdev,return ret; } +static int ath10k_pci_probe (struct pci_dev *pdev, +const struct pci_device_id *pci_dev) +{ +int cnt =0 ; +int rv; +do { + rv =__ath10k_pci_probe (pdev, pci_dev); +if (rv ==0 ) +return rv; +pr_err ("ath10k: failed to probe PCI : %d, retry-count: %d\n" , rv, cnt); +udelay (10000 );/* let the ath10k firmware gerbil take a small break */ + }while (cnt++ <10 ); +return rv; +} + +static void ath10k_pci_remove (struct pci_dev *pdev) {struct ath10k *ar =pci_get_drvdata (pdev);
Signature · 1 line
2.4.11
kbuild test robot
build botreproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross…
Hi Ben,
[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v4.14-rc3 next-20170929]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/greearb-candelatech-com/ath10k-Retry-pci-probe-on-failure/20170930-020608 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm
All errors (new ones prefixed by >>):
>> ERROR: "__bad_udelay" [drivers/net/wireless/ath/ath10k/ath10k_pci.ko] undefined!
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation