summaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
authorBrett M Russ <russb@emc.com>2005-08-15 15:23:41 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-08 15:07:08 -0700
commita04ce0ffcaf561994ecf382cd3caad75556dc499 (patch)
treee891a767810333fe2bf29ddb35f57b0a3ec6e18e /drivers/pci/msi.c
parent3fe9d19f9e86a55679f5f2b38ec0a43a1a510cee (diff)
downloadop-kernel-dev-a04ce0ffcaf561994ecf382cd3caad75556dc499.zip
op-kernel-dev-a04ce0ffcaf561994ecf382cd3caad75556dc499.tar.gz
[PATCH] PCI/libata INTx cleanup
Simple cleanup to eliminate X copies of the pci_enable_intx() function in libata. Moved ahci.c's pci_intx() to pci.c and use it throughout libata and msi.c. Signed-off-by: Brett Russ <russb@emc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 532f73b..ee8677b 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -439,10 +439,7 @@ static void enable_msi_mode(struct pci_dev *dev, int pos, int type)
}
if (pci_find_capability(dev, PCI_CAP_ID_EXP)) {
/* PCI Express Endpoint device detected */
- u16 cmd;
- pci_read_config_word(dev, PCI_COMMAND, &cmd);
- cmd |= PCI_COMMAND_INTX_DISABLE;
- pci_write_config_word(dev, PCI_COMMAND, cmd);
+ pci_intx(dev, 0); /* disable intx */
}
}
@@ -461,10 +458,7 @@ void disable_msi_mode(struct pci_dev *dev, int pos, int type)
}
if (pci_find_capability(dev, PCI_CAP_ID_EXP)) {
/* PCI Express Endpoint device detected */
- u16 cmd;
- pci_read_config_word(dev, PCI_COMMAND, &cmd);
- cmd &= ~PCI_COMMAND_INTX_DISABLE;
- pci_write_config_word(dev, PCI_COMMAND, cmd);
+ pci_intx(dev, 1); /* enable intx */
}
}
OpenPOWER on IntegriCloud