summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <kubakici@wp.pl>2013-05-07 00:28:50 +0200
committerJohn W. Linville <linville@tuxdriver.com>2013-05-22 21:05:32 +0200
commit9483f40d8d01918b399b4e24d0c1111db0afffeb (patch)
tree091a89798591e6989d3f8419e78683156e4a62ee
parentrt2x00: rt2x00dev: defer operational mode detection (diff)
downloadlinux-9483f40d8d01918b399b4e24d0c1111db0afffeb.tar.xz
linux-9483f40d8d01918b399b4e24d0c1111db0afffeb.zip
rt2x00pci: Use PCI MSIs whenever possible
All PCIe devices must support MSIs, make use of them. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index dc49e525ae5e..76d95deb274b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -105,11 +105,13 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops)
goto exit_release_regions;
}
+ pci_enable_msi(pci_dev);
+
hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
if (!hw) {
rt2x00_probe_err("Failed to allocate hardware\n");
retval = -ENOMEM;
- goto exit_release_regions;
+ goto exit_disable_msi;
}
pci_set_drvdata(pci_dev, hw);
@@ -150,6 +152,9 @@ exit_free_reg:
exit_free_device:
ieee80211_free_hw(hw);
+exit_disable_msi:
+ pci_disable_msi(pci_dev);
+
exit_release_regions:
pci_release_regions(pci_dev);
@@ -174,6 +179,8 @@ void rt2x00pci_remove(struct pci_dev *pci_dev)
rt2x00pci_free_reg(rt2x00dev);
ieee80211_free_hw(hw);
+ pci_disable_msi(pci_dev);
+
/*
* Free the PCI device data.
*/