Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit 3f0c8aa4 authored by Jason S. McMullan's avatar Jason S. McMullan Committed by Harsh Shandilya
Browse files

PCI: Support PCIe devices with short cfg_size



commit c20aecf6963d1273d8f6d61c042b4845441ca592 upstream.

If a device quirk modifies the pci_dev->cfg_size to be less than
PCI_CFG_SPACE_EXP_SIZE (4096), but greater than PCI_CFG_SPACE_SIZE (256),
the PCI sysfs interface truncates the readable size to PCI_CFG_SPACE_SIZE.

Allow sysfs access to config space up to cfg_size, even if the device
doesn't support the entire 4096-byte PCIe config space.

Note that pci_read_config() and pci_write_config() limit access to
dev->cfg_size even though pcie_config_attr contains 4096 (the maximum
size).

Signed-off-by: default avatarJason S. McMullan <jason.mcmullan@netronome.com>
[simon: edited changelog]
Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
[bhelgaas: more changelog edits]
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 0a90cd51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment