diff options
author | 2024-12-16 19:56:28 +0200 | |
---|---|---|
committer | 2025-02-18 15:40:54 -0600 | |
commit | 07854e08cdf3e2c294ca7941a8958830d880eaf7 (patch) | |
tree | 2514b1eb25f26d1c2b073be3b8334c3538a27512 | |
parent | PCI: Always have realloc_head in __assign_resources_sorted() (diff) | |
download | wireguard-linux-07854e08cdf3e2c294ca7941a8958830d880eaf7.tar.xz wireguard-linux-07854e08cdf3e2c294ca7941a8958830d880eaf7.zip |
PCI: Indicate optional resource assignment failures
Add pci_dbg() to note that an assignment failure was for an optional
resource and reword existing message about resource resize to say the
change was optional.
Link: https://lore.kernel.org/r/20241216175632.4175-22-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Xiaochun Lee <lixc17@lenovo.com>
-rw-r--r-- | drivers/pci/setup-bus.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index aa092644808b..c80162d6aefd 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -273,13 +273,17 @@ static void reassign_resources_sorted(struct list_head *realloc_head, align = add_res->min_align; if (!resource_size(res)) { resource_set_range(res, align, add_size); - if (pci_assign_resource(dev, idx)) + if (pci_assign_resource(dev, idx)) { + pci_dbg(dev, + "%s %pR: ignoring failure in optional allocation\n", + res_name, res); reset_resource(res); + } } else { res->flags |= add_res->flags & (IORESOURCE_STARTALIGN|IORESOURCE_SIZEALIGN); if (pci_reassign_resource(dev, idx, add_size, align)) - pci_info(dev, "%s %pR: failed to add %llx\n", + pci_info(dev, "%s %pR: failed to add optional %llx\n", res_name, res, (unsigned long long) add_size); } |