mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 09:02:00 +00:00
PCI/portdrv: Use PCI Express Capability accessors
Use PCI Express Capability access functions to simplify portdrv. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
231afea189
commit
33e8b34fdd
@ -120,8 +120,7 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask)
|
|||||||
* the value in this field indicates which MSI-X Table entry is
|
* the value in this field indicates which MSI-X Table entry is
|
||||||
* used to generate the interrupt message."
|
* used to generate the interrupt message."
|
||||||
*/
|
*/
|
||||||
pos = pci_pcie_cap(dev);
|
pcie_capability_read_word(dev, PCI_EXP_FLAGS, ®16);
|
||||||
pci_read_config_word(dev, pos + PCI_EXP_FLAGS, ®16);
|
|
||||||
entry = (reg16 & PCI_EXP_FLAGS_IRQ) >> 9;
|
entry = (reg16 & PCI_EXP_FLAGS_IRQ) >> 9;
|
||||||
if (entry >= nr_entries)
|
if (entry >= nr_entries)
|
||||||
goto Error;
|
goto Error;
|
||||||
|
Loading…
Reference in New Issue
Block a user