pci_epc_clear_bar(9)
π pci_epc_clear_bar β reset the BAR β¨
Okay bestie, welcome to the Kernel API Manual π β this one's about pci_epc_clear_bar and it's honestly iconic in its simplicity.
πΈ NAME πΈ
pci_epc_clear_bar β reset the BAR π«
π¦ SYNOPSIS π¦
void pci_epc_clear_bar (struct pci_epc *epc , u8 func_no , u8 vfunc_no ,
struct pci_epf_bar *epf_bar );
Like, that's the whole signature. No return value, no drama. It's giving void and unbothered. π
β¨ ARGUMENTS β¨
epcβ the EPC device for which the BAR has to be cleared π«Ά like, this is the endpoint controller doing the clearing, so obviously we need it.func_noβ the physical endpoint function number in the EPC device π₯ it's au8, keep that in mind.vfunc_noβ the virtual endpoint function number in the physical function π yes bestie, virtual within physical, nested situation, we love a layered queen.epf_barβ thestruct epf_barthat contains the BAR information π¦ that's your little info packet, it holds the BAR details.
π DESCRIPTION π
So basically β invoke this to reset the BAR of the endpoint device. That's it. That's the whole job. No cap. π
Like, you call it, the BAR gets reset, done, slay. It's the cleanup crew of the endpoint world. π§Ήβ¨
π SEE ALSO π
The kernel file lives at ./drivers/pci/endpoint/pci-epc-core.c β go peek, it's lowkey fascinating π and here's the whole friend group, all the sibling functions you might vibe with:
pci_epc_put(9)pci_epc_get(9)pci_epc_get_first_free_bar(9)pci_epc_get_next_free_bar(9)pci_epc_get_features(9)pci_epc_get_aux_resources_count(9)pci_epc_get_aux_resources(9)pci_epc_stop(9)pci_epc_start(9)pci_epc_raise_irq(9)pci_epc_map_msi_irq(9)pci_epc_get_msi(9)pci_epc_set_msi(9)pci_epc_get_msix(9)pci_epc_set_msix(9)pci_epc_unmap_addr(9)pci_epc_map_addr(9)pci_epc_mem_map(9)pci_epc_mem_unmap(9)pci_epc_set_bar(9)pci_epc_bar_size_to_rebar_cap(9)pci_epc_write_header(9)pci_epc_add_epf(9)pci_epc_remove_epf(9)pci_epc_linkup(9)pci_epc_linkdown(9)pci_epc_init_notify(9)pci_epc_notify_pending_init(9)pci_epc_deinit_notify(9)pci_epc_bus_master_enable_notify(9)pci_epc_destroy(9)__pci_epc_create(9)__devm_pci_epc_create(9)
π shoutout to./drivers/pci/endpointfor being the home of this whole era of the kernel β this page is dated October 2026, and it's thepci_epc_clear_bar(9)page, bestie. go clear some BARs responsibly. ily. π«Άβ¨
π¦ 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