diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2008-03-17 17:21:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-03-25 01:38:44 -0400 |
commit | 49741c4d01554c2630cea02cfdf236b17062a912 (patch) | |
tree | 715cea9da25804eebc683925616bd0f6042d6819 /drivers/pci/pci.c | |
parent | 8a443df40b35da89e32fcd499d7720c8c2cc2eee (diff) |
PCI: revert "pcie: utilize pcie transaction pending bit"
Revert as it is reported to cause problems for people.
commit 4348a2dc49f9baecd34a9b0904245488c6189398
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>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 183fddaa38b7..a4445b7210bf 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -314,24 +314,6 @@ int pci_find_ht_capability(struct pci_dev *dev, int ht_cap) | |||
314 | } | 314 | } |
315 | EXPORT_SYMBOL_GPL(pci_find_ht_capability); | 315 | EXPORT_SYMBOL_GPL(pci_find_ht_capability); |
316 | 316 | ||
317 | void pcie_wait_pending_transaction(struct pci_dev *dev) | ||
318 | { | ||
319 | int pos; | ||
320 | u16 reg16; | ||
321 | |||
322 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); | ||
323 | if (!pos) | ||
324 | return; | ||
325 | while (1) { | ||
326 | pci_read_config_word(dev, pos + PCI_EXP_DEVSTA, ®16); | ||
327 | if (!(reg16 & PCI_EXP_DEVSTA_TRPND)) | ||
328 | break; | ||
329 | cpu_relax(); | ||
330 | } | ||
331 | |||
332 | } | ||
333 | EXPORT_SYMBOL_GPL(pcie_wait_pending_transaction); | ||
334 | |||
335 | /** | 317 | /** |
336 | * pci_find_parent_resource - return resource region of parent bus of given region | 318 | * pci_find_parent_resource - return resource region of parent bus of given region |
337 | * @dev: PCI device structure contains resources to be searched | 319 | * @dev: PCI device structure contains resources to be searched |
@@ -936,9 +918,6 @@ pci_disable_device(struct pci_dev *dev) | |||
936 | if (atomic_sub_return(1, &dev->enable_cnt) != 0) | 918 | if (atomic_sub_return(1, &dev->enable_cnt) != 0) |
937 | return; | 919 | return; |
938 | 920 | ||
939 | /* Wait for all transactions are finished before disabling the device */ | ||
940 | pcie_wait_pending_transaction(dev); | ||
941 | |||
942 | pci_read_config_word(dev, PCI_COMMAND, &pci_command); | 921 | pci_read_config_word(dev, PCI_COMMAND, &pci_command); |
943 | if (pci_command & PCI_COMMAND_MASTER) { | 922 | if (pci_command & PCI_COMMAND_MASTER) { |
944 | pci_command &= ~PCI_COMMAND_MASTER; | 923 | pci_command &= ~PCI_COMMAND_MASTER; |