Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755599AbdDNTOV (ORCPT ); Fri, 14 Apr 2017 15:14:21 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:44133 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754541AbdDNTMD (ORCPT ); Fri, 14 Apr 2017 15:12:03 -0400 From: Christoph Hellwig To: Bjorn Helgaas , Giovanni Cabiddu , Salvatore Benedetto , Mike Marciniszyn , Dennis Dalessandro , Derek Chickles , Satanand Burla , Felix Manlunas , Raghu Vatsavayi , Jeff Kirsher Cc: linux-pci@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] PCI: call pcie_flr from reset_chelsio_generic_dev Date: Fri, 14 Apr 2017 21:11:27 +0200 Message-Id: <20170414191131.14286-4-hch@lst.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170414191131.14286-1-hch@lst.de> References: <20170414191131.14286-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1092 Lines: 36 Instead of copy & pasting and old version of the code. Signed-off-by: Christoph Hellwig Acked-by: Bjorn Helgaas --- drivers/pci/quirks.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 8195ca294ee5..715ed8c08fa3 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3750,20 +3750,7 @@ static int reset_chelsio_generic_dev(struct pci_dev *dev, int probe) PCI_MSIX_FLAGS_ENABLE | PCI_MSIX_FLAGS_MASKALL); - /* - * Start of pcie_flr() code sequence. This reset code is a copy of - * the guts of pcie_flr() because that's not an exported function. - */ - - if (!pci_wait_for_pending_transaction(dev)) - dev_err(&dev->dev, "transaction is not cleared; proceeding with reset anyway\n"); - - pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR); - msleep(100); - - /* - * End of pcie_flr() code sequence. - */ + pcie_flr(dev); /* * Restore the configuration information (BAR values, etc.) including -- 2.11.0