aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index bfbff8335268..f04b9ffe4153 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -16,6 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/spinlock.h> 17#include <linux/spinlock.h>
18#include <asm/dma.h> /* isa_dma_bridge_buggy */ 18#include <asm/dma.h> /* isa_dma_bridge_buggy */
19#include "pci.h"
19 20
20 21
21/** 22/**
@@ -398,10 +399,10 @@ pci_enable_device(struct pci_dev *dev)
398{ 399{
399 int err; 400 int err;
400 401
401 dev->is_enabled = 1;
402 if ((err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1))) 402 if ((err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1)))
403 return err; 403 return err;
404 pci_fixup_device(pci_fixup_enable, dev); 404 pci_fixup_device(pci_fixup_enable, dev);
405 dev->is_enabled = 1;
405 return 0; 406 return 0;
406} 407}
407 408
@@ -427,16 +428,15 @@ pci_disable_device(struct pci_dev *dev)
427{ 428{
428 u16 pci_command; 429 u16 pci_command;
429 430
430 dev->is_enabled = 0;
431 dev->is_busmaster = 0;
432
433 pci_read_config_word(dev, PCI_COMMAND, &pci_command); 431 pci_read_config_word(dev, PCI_COMMAND, &pci_command);
434 if (pci_command & PCI_COMMAND_MASTER) { 432 if (pci_command & PCI_COMMAND_MASTER) {
435 pci_command &= ~PCI_COMMAND_MASTER; 433 pci_command &= ~PCI_COMMAND_MASTER;
436 pci_write_config_word(dev, PCI_COMMAND, pci_command); 434 pci_write_config_word(dev, PCI_COMMAND, pci_command);
437 } 435 }
436 dev->is_busmaster = 0;
438 437
439 pcibios_disable_device(dev); 438 pcibios_disable_device(dev);
439 dev->is_enabled = 0;
440} 440}
441 441
442/** 442/**
@@ -749,17 +749,6 @@ pci_set_dma_mask(struct pci_dev *dev, u64 mask)
749} 749}
750 750
751int 751int
752pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask)
753{
754 if (!pci_dac_dma_supported(dev, mask))
755 return -EIO;
756
757 dev->dma_mask = mask;
758
759 return 0;
760}
761
762int
763pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) 752pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
764{ 753{
765 if (!pci_dma_supported(dev, mask)) 754 if (!pci_dma_supported(dev, mask))
@@ -821,7 +810,6 @@ EXPORT_SYMBOL(pci_set_master);
821EXPORT_SYMBOL(pci_set_mwi); 810EXPORT_SYMBOL(pci_set_mwi);
822EXPORT_SYMBOL(pci_clear_mwi); 811EXPORT_SYMBOL(pci_clear_mwi);
823EXPORT_SYMBOL(pci_set_dma_mask); 812EXPORT_SYMBOL(pci_set_dma_mask);
824EXPORT_SYMBOL(pci_dac_set_dma_mask);
825EXPORT_SYMBOL(pci_set_consistent_dma_mask); 813EXPORT_SYMBOL(pci_set_consistent_dma_mask);
826EXPORT_SYMBOL(pci_assign_resource); 814EXPORT_SYMBOL(pci_assign_resource);
827EXPORT_SYMBOL(pci_find_parent_resource); 815EXPORT_SYMBOL(pci_find_parent_resource);