Commit 9483f40d authored by Jakub Kicinski's avatar Jakub Kicinski Committed by John W. Linville

rt2x00pci: Use PCI MSIs whenever possible

All PCIe devices must support MSIs, make use of them.
Signed-off-by: default avatarJakub Kicinski <kubakici@wp.pl>
Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e9e43303
...@@ -105,11 +105,13 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops) ...@@ -105,11 +105,13 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops)
goto exit_release_regions; goto exit_release_regions;
} }
pci_enable_msi(pci_dev);
hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
if (!hw) { if (!hw) {
rt2x00_probe_err("Failed to allocate hardware\n"); rt2x00_probe_err("Failed to allocate hardware\n");
retval = -ENOMEM; retval = -ENOMEM;
goto exit_release_regions; goto exit_disable_msi;
} }
pci_set_drvdata(pci_dev, hw); pci_set_drvdata(pci_dev, hw);
...@@ -150,6 +152,9 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops) ...@@ -150,6 +152,9 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops)
exit_free_device: exit_free_device:
ieee80211_free_hw(hw); ieee80211_free_hw(hw);
exit_disable_msi:
pci_disable_msi(pci_dev);
exit_release_regions: exit_release_regions:
pci_release_regions(pci_dev); pci_release_regions(pci_dev);
...@@ -174,6 +179,8 @@ void rt2x00pci_remove(struct pci_dev *pci_dev) ...@@ -174,6 +179,8 @@ void rt2x00pci_remove(struct pci_dev *pci_dev)
rt2x00pci_free_reg(rt2x00dev); rt2x00pci_free_reg(rt2x00dev);
ieee80211_free_hw(hw); ieee80211_free_hw(hw);
pci_disable_msi(pci_dev);
/* /*
* Free the PCI device data. * Free the PCI device data.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment