diff options
author | Dongdong Liu <liudongdong3@huawei.com> | 2017-10-11 18:52:58 +0800 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2017-10-19 18:02:01 -0500 |
commit | 7c950b9e53732f574e3a46d37c62f1f33d0b218c (patch) | |
tree | 78d359b1ba0a4756adfe1374d5a9228d4423c212 /drivers/pci | |
parent | 9e66317d3c92ddaab330c125dfe9d06eee268aff (diff) | |
download | linux-stable-7c950b9e53732f574e3a46d37c62f1f33d0b218c.tar.gz linux-stable-7c950b9e53732f574e3a46d37c62f1f33d0b218c.tar.bz2 linux-stable-7c950b9e53732f574e3a46d37c62f1f33d0b218c.zip |
PCI/portdrv: Add #defines for AER and DPC Interrupt Message Number masks
In the AER case, the mask isn't strictly necessary because there are no
higher-order bits above the Interrupt Message Number, but using a #define
will make it possible to grep for it.
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 313a21df1692..72fcbe5567dd 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c @@ -114,7 +114,7 @@ static int pcie_port_enable_irq_vec(struct pci_dev *dev, int *irqs, int mask) */ pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, ®32); - entry = reg32 >> 27; + entry = (reg32 & PCI_ERR_ROOT_AER_IRQ) >> 27; if (entry >= nr_entries) goto out_free_irqs; @@ -141,7 +141,7 @@ static int pcie_port_enable_irq_vec(struct pci_dev *dev, int *irqs, int mask) */ pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC); pci_read_config_word(dev, pos + PCI_EXP_DPC_CAP, ®16); - entry = reg16 & 0x1f; + entry = reg16 & PCI_EXP_DPC_IRQ; if (entry >= nr_entries) goto out_free_irqs; |