pci_rebar_find_pos(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


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