diff options
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 20 |
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 | ||
751 | int | 751 | int |
752 | pci_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 | |||
762 | int | ||
763 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | 752 | pci_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); | |||
821 | EXPORT_SYMBOL(pci_set_mwi); | 810 | EXPORT_SYMBOL(pci_set_mwi); |
822 | EXPORT_SYMBOL(pci_clear_mwi); | 811 | EXPORT_SYMBOL(pci_clear_mwi); |
823 | EXPORT_SYMBOL(pci_set_dma_mask); | 812 | EXPORT_SYMBOL(pci_set_dma_mask); |
824 | EXPORT_SYMBOL(pci_dac_set_dma_mask); | ||
825 | EXPORT_SYMBOL(pci_set_consistent_dma_mask); | 813 | EXPORT_SYMBOL(pci_set_consistent_dma_mask); |
826 | EXPORT_SYMBOL(pci_assign_resource); | 814 | EXPORT_SYMBOL(pci_assign_resource); |
827 | EXPORT_SYMBOL(pci_find_parent_resource); | 815 | EXPORT_SYMBOL(pci_find_parent_resource); |