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

crypto: qat - use pcie_flr instead of duplicating it

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Christoph Hellwig and committed by
Herbert Xu
248c6505 5f052c9c

+1 -14
+1 -14
drivers/crypto/qat/qat_common/adf_aer.c
··· 109 109 110 110 void adf_reset_flr(struct adf_accel_dev *accel_dev) 111 111 { 112 - struct pci_dev *pdev = accel_to_pci_dev(accel_dev); 113 - u16 control = 0; 114 - int pos = 0; 115 - 116 - dev_info(&GET_DEV(accel_dev), "Function level reset\n"); 117 - pos = pci_pcie_cap(pdev); 118 - if (!pos) { 119 - dev_err(&GET_DEV(accel_dev), "Restart device failed\n"); 120 - return; 121 - } 122 - pci_read_config_word(pdev, pos + PCI_EXP_DEVCTL, &control); 123 - control |= PCI_EXP_DEVCTL_BCR_FLR; 124 - pci_write_config_word(pdev, pos + PCI_EXP_DEVCTL, control); 125 - msleep(100); 112 + pcie_flr(accel_to_pci_dev(accel_dev)); 126 113 } 127 114 EXPORT_SYMBOL_GPL(adf_reset_flr); 128 115