On Sat, Jun 14, 2014 at 8:18 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote: > On Sat, Jun 14, 2014 at 2:21 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote: >> diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c >> index f44fdb5b0b08..18ac24d84f9b 100644 >> --- a/drivers/pci/hotplug/pciehp_hpc.c >> +++ b/drivers/pci/hotplug/pciehp_hpc.c >> @@ -142,11 +143,24 @@ static void pcie_wait_cmd(struct controller *ctrl) >> if (ctrl->no_cmd_complete) >> return; >> >> + if (!ctrl->cmd_busy) >> + return; > > Can you move those two lines to second patch ? Yeah, those lines don't really fit in this patch. I don't think they really fit in the second patch ("Wait for hotplug command completion lazily") either, since that is simply moving the wait from after issuing a command to before issuing the next command. I moved them to the first patch ("Make pcie_wait_cmd() self-contained") since that is more concerned with cleaning up pcie_wait_cmd(). It could even be a separate patch; it would have made sense to check cmd_busy before calling pcie_wait_cmd(). But it seemed like overkill to make another patch just for that. Anyway, I put them all at http://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/?h=pci/hotplug . I'll add the results of Rajat's testing (assuming that goes well). It would be good if you could make sure they do what you expect on your hardware, too. If you do test it, let me know what sort of controller you tested on (vendor/device ID). I think you will see a "Timeout on hotplug command %#010x (issued %u msec ago)" message. I don't think there will be any actual slowdown, but I hope the message doesn't cause users too much heartburn. > Other than that, for all 4 patches > > Acked-by: Yinghai Lu <yinghai@xxxxxxxxxx> -- 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