Skip to content

Commit

Permalink
PCI: Call pcie_flr() from reset_chelsio_generic_dev()
Browse files Browse the repository at this point in the history
Instead of copy & pasting and old version of the code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Christoph Hellwig authored and Bjorn Helgaas committed Apr 20, 2017
1 parent c8d8096 commit 48f52d1
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions drivers/pci/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48f52d1

Please sign in to comment.