Skip to content
Commit c20aecf6 authored by Jason S. McMullan's avatar Jason S. McMullan Committed by Bjorn Helgaas
Browse files

PCI: Support PCIe devices with short cfg_size



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>
parent 21461775
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment