Skip to content

Commit 07854e0

Browse files
ij-intelbjorn-helgaas
authored andcommitted
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/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Tested-by: Xiaochun Lee <[email protected]>
1 parent b3281eb commit 07854e0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/pci/setup-bus.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,17 @@ static void reassign_resources_sorted(struct list_head *realloc_head,
273273
align = add_res->min_align;
274274
if (!resource_size(res)) {
275275
resource_set_range(res, align, add_size);
276-
if (pci_assign_resource(dev, idx))
276+
if (pci_assign_resource(dev, idx)) {
277+
pci_dbg(dev,
278+
"%s %pR: ignoring failure in optional allocation\n",
279+
res_name, res);
277280
reset_resource(res);
281+
}
278282
} else {
279283
res->flags |= add_res->flags &
280284
(IORESOURCE_STARTALIGN|IORESOURCE_SIZEALIGN);
281285
if (pci_reassign_resource(dev, idx, add_size, align))
282-
pci_info(dev, "%s %pR: failed to add %llx\n",
286+
pci_info(dev, "%s %pR: failed to add optional %llx\n",
283287
res_name, res,
284288
(unsigned long long) add_size);
285289
}

0 commit comments

Comments
 (0)