diff options
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e179af3186f5..ccff633a3948 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -798,6 +798,31 @@ pci_clear_mwi(struct pci_dev *dev) | |||
798 | } | 798 | } |
799 | } | 799 | } |
800 | 800 | ||
801 | /** | ||
802 | * pci_intx - enables/disables PCI INTx for device dev | ||
803 | * @dev: the PCI device to operate on | ||
804 | * @enable: boolean | ||
805 | * | ||
806 | * Enables/disables PCI INTx for device dev | ||
807 | */ | ||
808 | void | ||
809 | pci_intx(struct pci_dev *pdev, int enable) | ||
810 | { | ||
811 | u16 pci_command, new; | ||
812 | |||
813 | pci_read_config_word(pdev, PCI_COMMAND, &pci_command); | ||
814 | |||
815 | if (enable) { | ||
816 | new = pci_command & ~PCI_COMMAND_INTX_DISABLE; | ||
817 | } else { | ||
818 | new = pci_command | PCI_COMMAND_INTX_DISABLE; | ||
819 | } | ||
820 | |||
821 | if (new != pci_command) { | ||
822 | pci_write_config_word(pdev, PCI_COMMAND, pci_command); | ||
823 | } | ||
824 | } | ||
825 | |||
801 | #ifndef HAVE_ARCH_PCI_SET_DMA_MASK | 826 | #ifndef HAVE_ARCH_PCI_SET_DMA_MASK |
802 | /* | 827 | /* |
803 | * These can be overridden by arch-specific implementations | 828 | * These can be overridden by arch-specific implementations |
@@ -875,6 +900,7 @@ EXPORT_SYMBOL(pci_request_region); | |||
875 | EXPORT_SYMBOL(pci_set_master); | 900 | EXPORT_SYMBOL(pci_set_master); |
876 | EXPORT_SYMBOL(pci_set_mwi); | 901 | EXPORT_SYMBOL(pci_set_mwi); |
877 | EXPORT_SYMBOL(pci_clear_mwi); | 902 | EXPORT_SYMBOL(pci_clear_mwi); |
903 | EXPORT_SYMBOL_GPL(pci_intx); | ||
878 | EXPORT_SYMBOL(pci_set_dma_mask); | 904 | EXPORT_SYMBOL(pci_set_dma_mask); |
879 | EXPORT_SYMBOL(pci_set_consistent_dma_mask); | 905 | EXPORT_SYMBOL(pci_set_consistent_dma_mask); |
880 | EXPORT_SYMBOL(pci_assign_resource); | 906 | EXPORT_SYMBOL(pci_assign_resource); |