File tree Expand file tree Collapse file tree 2 files changed +20
-20
lines changed Expand file tree Collapse file tree 2 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,26 @@ void pci_disable_msi(struct pci_dev *dev)
59
59
}
60
60
EXPORT_SYMBOL (pci_disable_msi );
61
61
62
+ /**
63
+ * pci_msix_vec_count() - Get number of MSI-X interrupt vectors on device
64
+ * @dev: the PCI device to operate on
65
+ *
66
+ * Return: number of MSI-X interrupt vectors available on this device
67
+ * (i.e., the device's MSI-X capability structure "table size"), -EINVAL
68
+ * if the device is not MSI-X capable, other errnos otherwise.
69
+ */
70
+ int pci_msix_vec_count (struct pci_dev * dev )
71
+ {
72
+ u16 control ;
73
+
74
+ if (!dev -> msix_cap )
75
+ return - EINVAL ;
76
+
77
+ pci_read_config_word (dev , dev -> msix_cap + PCI_MSIX_FLAGS , & control );
78
+ return msix_table_size (control );
79
+ }
80
+ EXPORT_SYMBOL (pci_msix_vec_count );
81
+
62
82
/**
63
83
* pci_enable_msix_range() - Enable MSI-X interrupt mode on device
64
84
* @dev: the PCI device to operate on
Original file line number Diff line number Diff line change @@ -701,26 +701,6 @@ void pci_msi_shutdown(struct pci_dev *dev)
701
701
pcibios_alloc_irq (dev );
702
702
}
703
703
704
- /**
705
- * pci_msix_vec_count - return the number of device's MSI-X table entries
706
- * @dev: pointer to the pci_dev data structure of MSI-X device function
707
- * This function returns the number of device's MSI-X table entries and
708
- * therefore the number of MSI-X vectors device is capable of sending.
709
- * It returns a negative errno if the device is not capable of sending MSI-X
710
- * interrupts.
711
- **/
712
- int pci_msix_vec_count (struct pci_dev * dev )
713
- {
714
- u16 control ;
715
-
716
- if (!dev -> msix_cap )
717
- return - EINVAL ;
718
-
719
- pci_read_config_word (dev , dev -> msix_cap + PCI_MSIX_FLAGS , & control );
720
- return msix_table_size (control );
721
- }
722
- EXPORT_SYMBOL (pci_msix_vec_count );
723
-
724
704
static int __pci_enable_msix (struct pci_dev * dev , struct msix_entry * entries ,
725
705
int nvec , struct irq_affinity * affd , int flags )
726
706
{
You can’t perform that action at this time.
0 commit comments