Skip to content

Commit

Permalink
PCI: revert "pcie: utilize pcie transaction pending bit"
Browse files Browse the repository at this point in the history
Revert as it is reported to cause problems for people.

commit 4348a2d
Author: Shaohua Li <shaohua.li@intel.com>
Date:   Wed Oct 24 10:45:08 2007 +0800

    pcie: utilize pcie transaction pending bit

    PCIE has a mechanism to wait for Non-Posted request to complete. I think
    pci_disable_device is a good place to do this.

    Signed-off-by: Shaohua Li <shaohua.li@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Due to the regression reported at
http://bugzilla.kernel.org/show_bug.cgi?id=10065

Cc: Shaohua Li <shaohua.li@intel.com>
Cc: Soeren Sonnenburg <kernel@nn7.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
akpm00 authored and gregkh committed Mar 25, 2008
1 parent 8a443df commit 49741c4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
21 changes: 0 additions & 21 deletions drivers/pci/pci.c
Expand Up @@ -314,24 +314,6 @@ int pci_find_ht_capability(struct pci_dev *dev, int ht_cap)
}
EXPORT_SYMBOL_GPL(pci_find_ht_capability);

void pcie_wait_pending_transaction(struct pci_dev *dev)
{
int pos;
u16 reg16;

pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
if (!pos)
return;
while (1) {
pci_read_config_word(dev, pos + PCI_EXP_DEVSTA, &reg16);
if (!(reg16 & PCI_EXP_DEVSTA_TRPND))
break;
cpu_relax();
}

}
EXPORT_SYMBOL_GPL(pcie_wait_pending_transaction);

/**
* pci_find_parent_resource - return resource region of parent bus of given region
* @dev: PCI device structure contains resources to be searched
Expand Down Expand Up @@ -936,9 +918,6 @@ pci_disable_device(struct pci_dev *dev)
if (atomic_sub_return(1, &dev->enable_cnt) != 0)
return;

/* Wait for all transactions are finished before disabling the device */
pcie_wait_pending_transaction(dev);

pci_read_config_word(dev, PCI_COMMAND, &pci_command);
if (pci_command & PCI_COMMAND_MASTER) {
pci_command &= ~PCI_COMMAND_MASTER;
Expand Down
4 changes: 0 additions & 4 deletions include/linux/pci.h
Expand Up @@ -513,7 +513,6 @@ int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap);
int pci_find_ext_capability(struct pci_dev *dev, int cap);
int pci_find_ht_capability(struct pci_dev *dev, int ht_cap);
int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap);
void pcie_wait_pending_transaction(struct pci_dev *dev);
struct pci_bus *pci_find_next_bus(const struct pci_bus *from);

struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device,
Expand Down Expand Up @@ -884,9 +883,6 @@ static inline int pci_find_ext_capability(struct pci_dev *dev, int cap)
return 0;
}

static inline void pcie_wait_pending_transaction(struct pci_dev *dev)
{ }

/* Power management related routines */
static inline int pci_save_state(struct pci_dev *dev)
{
Expand Down

0 comments on commit 49741c4

Please sign in to comment.