On Sat, Oct 02, 2010 at 10:02:19AM -0500, david.hagood@xxxxxxxxx wrote: > I've tried releasing the resources. If I shut the PCI device down, then my > driver gets turned off (not good). > > Is there any way to tell the kernel "things have changed on the hardware, > rescan, but DON'T destroy the device driver - it knows how to deal with > this!" > > I realize that in some situations it may not be possible to reallocate > resources (e.g. upstream bridges don't have the space) - assume for the > moment that's not a problem. > One of the points of having an FPGA is that you can implement these things sensibly, rather than forcing the kernel to work around the crap that was implemented by people who have an aversion to the specifictions. Assuming that you're not about to implement hotplug in a standards compliant way, or at all, you do unfortunately have a few other options. The easiest is probably to have a device enable fixup that will resize the resources for you, and then to use the PM backends for doing a disable/enable or reenable pair whilst ignoring the refcounting. This will avoid the driver being disabled at least, but also reduces the upstreamability of your driver by several orders of magnitude. If you can tolerate a suspend/resume cycle on the device then you should be able to forego pretty much all of this as well, as the device BARs are updated on resume already. -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html