Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

PCI: Add kerneldoc for pci_resize_resource()

As pci_resize_resource() is meant to be used also outside of PCI core,
document the interface with kerneldoc.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Alex Bennée <alex.bennee@linaro.org> # AVA, AMD GPU
Link: https://patch.msgid.link/20251113162628.5946-8-ilpo.jarvinen@linux.intel.com

authored by

Ilpo Järvinen and committed by
Bjorn Helgaas
d787018e 337b1b56

+20
+20
drivers/pci/setup-res.c
··· 455 455 resource_set_size(res, res_size); 456 456 } 457 457 458 + /** 459 + * pci_resize_resource - reconfigure a Resizable BAR and resources 460 + * @dev: the PCI device 461 + * @resno: index of the BAR to be resized 462 + * @size: new size as defined in the spec (0=1MB, 31=128TB) 463 + * @exclude_bars: a mask of BARs that should not be released 464 + * 465 + * Reconfigure @resno to @size and re-run resource assignment algorithm 466 + * with the new size. 467 + * 468 + * Prior to resize, release @dev resources that share a bridge window with 469 + * @resno. This unpins the bridge window resource to allow changing it. 470 + * 471 + * The caller may prevent releasing a particular BAR by providing 472 + * @exclude_bars mask, but this may result in the resize operation failing 473 + * due to insufficient space. 474 + * 475 + * Return: 0 on success, or negative on error. In case of an error, the 476 + * resources are restored to their original places. 477 + */ 458 478 int pci_resize_resource(struct pci_dev *dev, int resno, int size, 459 479 int exclude_bars) 460 480 {