Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

liquidio: use pcie_flr instead of duplicating it

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Christoph Hellwig and committed by
David S. Miller
9ad09803 1b86f702

+1 -16
+1 -16
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
··· 879 879 */ 880 880 static void octeon_pci_flr(struct octeon_device *oct) 881 881 { 882 - u16 status; 883 - 884 882 pci_save_state(oct->pci_dev); 885 883 886 884 pci_cfg_access_lock(oct->pci_dev); ··· 887 889 pci_write_config_word(oct->pci_dev, PCI_COMMAND, 888 890 PCI_COMMAND_INTX_DISABLE); 889 891 890 - /* Wait for Transaction Pending bit clean */ 891 - msleep(100); 892 - pcie_capability_read_word(oct->pci_dev, PCI_EXP_DEVSTA, &status); 893 - if (status & PCI_EXP_DEVSTA_TRPND) { 894 - dev_info(&oct->pci_dev->dev, "Function reset incomplete after 100ms, sleeping for 5 seconds\n"); 895 - ssleep(5); 896 - pcie_capability_read_word(oct->pci_dev, PCI_EXP_DEVSTA, 897 - &status); 898 - if (status & PCI_EXP_DEVSTA_TRPND) 899 - dev_info(&oct->pci_dev->dev, "Function reset still incomplete after 5s, reset anyway\n"); 900 - } 901 - pcie_capability_set_word(oct->pci_dev, PCI_EXP_DEVCTL, 902 - PCI_EXP_DEVCTL_BCR_FLR); 903 - mdelay(100); 892 + pcie_flr(oct->pci_dev); 904 893 905 894 pci_cfg_access_unlock(oct->pci_dev); 906 895