diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2024-07-19 10:10:27 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2024-07-19 10:10:27 -0500 |
commit | 477ddcd8ef8bc555e021eb1a9d13bf182538a363 (patch) | |
tree | edc95546916aa22688f01af4105928581a17a708 /drivers/pci | |
parent | da3552d2256c8bb8953a65d94b26994e29998f89 (diff) | |
parent | fea93a3e5d5e6a09eb153866d2ce60ea3287a70d (diff) | |
download | lwn-477ddcd8ef8bc555e021eb1a9d13bf182538a363.tar.gz lwn-477ddcd8ef8bc555e021eb1a9d13bf182538a363.zip |
Merge branch 'pci/controller/hyperv'
- Return zero, not garbage, when reading PCI_INTERRUPT_PIN from a Hyper-V
device (Wei Liu)
* pci/controller/hyperv:
PCI: hv: Return zero, not garbage, when reading PCI_INTERRUPT_PIN
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/controller/pci-hyperv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index 5992280e8110..cdd5be16021d 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c @@ -1130,8 +1130,8 @@ static void _hv_pcifront_read_config(struct hv_pci_dev *hpdev, int where, PCI_CAPABILITY_LIST) { /* ROM BARs are unimplemented */ *val = 0; - } else if (where >= PCI_INTERRUPT_LINE && where + size <= - PCI_INTERRUPT_PIN) { + } else if ((where >= PCI_INTERRUPT_LINE && where + size <= PCI_INTERRUPT_PIN) || + (where >= PCI_INTERRUPT_PIN && where + size <= PCI_MIN_GNT)) { /* * Interrupt Line and Interrupt PIN are hard-wired to zero * because this front-end only supports message-signaled |