Contributors: 13
Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
Björn Helgaas |
63 |
39.13% |
2 |
11.11% |
Vidya Sagar |
15 |
9.32% |
1 |
5.56% |
Yinghai Lu |
14 |
8.70% |
1 |
5.56% |
Andrew Morton |
12 |
7.45% |
1 |
5.56% |
Gavin Shan |
11 |
6.83% |
3 |
16.67% |
Eric W. Biedermann |
9 |
5.59% |
1 |
5.56% |
Jiang Liu |
7 |
4.35% |
1 |
5.56% |
Krzysztof Wilczynski |
7 |
4.35% |
1 |
5.56% |
Thomas Gleixner |
7 |
4.35% |
2 |
11.11% |
Michael S. Tsirkin |
6 |
3.73% |
2 |
11.11% |
Roland Dreier |
4 |
2.48% |
1 |
5.56% |
Matthew Wilcox |
4 |
2.48% |
1 |
5.56% |
Yijing Wang |
2 |
1.24% |
1 |
5.56% |
Total |
161 |
|
18 |
|
// SPDX-License-Identifier: GPL-2.0
/*
* MSI[X} related functions which are available unconditionally.
*/
#include "../pci.h"
/*
* Disable the MSI[X] hardware to avoid screaming interrupts during boot.
* This is the power on reset default so usually this should be a noop.
*/
void pci_msi_init(struct pci_dev *dev)
{
u16 ctrl;
dev->msi_cap = pci_find_capability(dev, PCI_CAP_ID_MSI);
if (!dev->msi_cap)
return;
pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &ctrl);
if (ctrl & PCI_MSI_FLAGS_ENABLE) {
pci_write_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS,
ctrl & ~PCI_MSI_FLAGS_ENABLE);
}
if (!(ctrl & PCI_MSI_FLAGS_64BIT))
dev->no_64bit_msi = 1;
}
void pci_msix_init(struct pci_dev *dev)
{
u16 ctrl;
dev->msix_cap = pci_find_capability(dev, PCI_CAP_ID_MSIX);
if (!dev->msix_cap)
return;
pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &ctrl);
if (ctrl & PCI_MSIX_FLAGS_ENABLE) {
pci_write_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS,
ctrl & ~PCI_MSIX_FLAGS_ENABLE);
}
}