On Mon, Jun 01, 2015 at 04:02:59PM -0600, Alex Williamson wrote: > On Mon, 2015-06-01 at 16:43 -0500, Bjorn Helgaas wrote: > > If we added calls to pcie_wait_cmd() in these places: > > > > pciehp_power_on_slot > > pciehp_power_off_slot > > pcie_disable_notification > > pciehp_reset_slot > > > > do you think that would be enough? > > I think that would solve the problem, but the API becomes very difficult > to use correctly if the programmer just needs to know that a > pcie_wait_cmd() is necessary following a pcie_write_cmd() if you really > want to be sure it's synchronous. pcie_write_cmd() should probably > incorporate the "safe" behavior and some new _nowait version should > handle the special cases where we don't need to wait I don't think of pcie_write_cmd() as an API, since it's static to pciehp_hpc.c, but I do like your idea. Bjorn -- 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