pci_rebar_find_pos(9)
π pci_rebar_find_pos(9) β a Kernel API Manual moment
Okay so bestie, welcome to pci_rebar_find_pos, a little helper from the <purple>Kernel API Manual</purple> corner of the world. The whole personality of this function? find the position of the resize control reg for a BAR. That's it, that's the vibe. π
β¨ NAME β¨
pci_rebar_find_pos β find position of resize control reg for BAR π
πΈ SYNOPSIS πΈ
int pci_rebar_find_pos (struct pci_dev *pdev , int bar );
π¦ ARGUMENTS π¦
pdevβ the PCI device, obviously. Your main character struct. πbarβ the BAR you're trying to find. Like, which one. π
π DESCRIPTION π
It's a helper. A little guy whose whole job is finding the position of the control register for a BAR. No cap, that's literally all it does, and honestly? iconic of it to be so focused. β¨
π RETURN π
So when it goes sideways, here's what you get back:
-ENOTSUPPβ if resizable BARs are not supported at all. Like, at all at all. π-ENOENTβ if no control register for the BAR could be found. It looked. It's gone. π«
ngl these are the error cases, so if you see one of these, that's your answer and you can stop asking. π
π₯ SEE ALSO π₯
Kernel file ./drivers/pci/rebar.c, plus the whole friend group:
pci_rebar_bytes_to_size(9)pci_rebar_size_to_bytes(9)pci_rebar_get_possible_sizes(9)pci_rebar_size_supported(9)pci_rebar_get_max_size(9)pci_rebar_get_current_size(9)pci_rebar_set_size(9)pci_resize_resource(9)
okay that's the whole page β huge shoutout to ./drivers/pci for hosting this one, dated October 2026, mwah π stay resizable, bestie π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms