aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@redhat.com>2013-12-30 02:28:14 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-01-03 19:17:55 -0500
commit7b92b4f61ec49cb1a5813298f35258bd7ecd3667 (patch)
tree3ca281ebb26a2885ff9ff5fd4e1b15393b6f7c20 /drivers/pci/msi.c
parentd1ac1d2622e8f0fd2a25127a8649d135b54db8a9 (diff)
PCI/MSI: Remove pci_enable_msi_block_auto()
The new pci_msi_vec_count() interface makes pci_enable_msi_block_auto() superfluous. Drivers can use pci_msi_vec_count() to learn the maximum number of MSIs supported by the device, and then call pci_enable_msi_block(). pci_enable_msi_block_auto() was introduced recently, and its only user is the AHCI driver, which is also updated by this change. Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index ba6d0a9bdd39..76507ab13beb 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -911,31 +911,6 @@ int pci_enable_msi_block(struct pci_dev *dev, int nvec)
911} 911}
912EXPORT_SYMBOL(pci_enable_msi_block); 912EXPORT_SYMBOL(pci_enable_msi_block);
913 913
914int pci_enable_msi_block_auto(struct pci_dev *dev, int *maxvec)
915{
916 int ret, nvec;
917
918 if (dev->current_state != PCI_D0)
919 return -EINVAL;
920
921 ret = pci_msi_vec_count(dev);
922 if (ret < 0)
923 return ret;
924
925 if (maxvec)
926 *maxvec = ret;
927
928 do {
929 nvec = ret;
930 ret = pci_enable_msi_block(dev, nvec);
931 } while (ret > 0);
932
933 if (ret < 0)
934 return ret;
935 return nvec;
936}
937EXPORT_SYMBOL(pci_enable_msi_block_auto);
938
939void pci_msi_shutdown(struct pci_dev *dev) 914void pci_msi_shutdown(struct pci_dev *dev)
940{ 915{
941 struct msi_desc *desc; 916 struct msi_desc *desc;