* Rescan/resize/reallocate PCI device BAR when it changes?
@ 2010-09-17 15:45 david.hagood
0 siblings, 0 replies; only message in thread
From: david.hagood @ 2010-09-17 15:45 UTC (permalink / raw)
To: linux-kernel
I have a PCI device which can, at run time, change the size of the BARs it
makes visible (e.g. a BAR which was disabled can become enabled, a BAR
that was 64kiByte becomes 128kiByte, etc.
I would like to get the kernel to reallocate the resources for that device
without having to shut the device down and reload the device driver - the
device driver will "know" how to handle this sort of event (actually, the
driver will be the one that caused the event).
I've tried various combinations of pci_scan_bus, pci_request_resources,
etc. to no avail: I can see the hardware change size, but the kernel data
structures for the PCI device steadfastly remain unchanged.
This is a fairly common issue for us embedded programmers: we have things
like FPGAs and microprocessors as endpoints that, as the device driver
finishes programming them, will suddenly have a need for different sized
BARs.
I realize that in some cases, it may not be possible to simply resize
things (e.g. not enough resources exist within the space allocated for the
bridge the device lives on to resize things), and I am prepared to handle
such events.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-17 15:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-17 15:45 Rescan/resize/reallocate PCI device BAR when it changes? david.hagood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox