From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:33375 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbdHAP4d (ORCPT ); Tue, 1 Aug 2017 11:56:33 -0400 Subject: Re: [PATCH] pci: shpchp: set the bridge busmaster if MSI are enabled To: Marcel Apfelbaum , Aleksandr Bezzubikov , linux-pci@vger.kernel.org Cc: bhelgaas@google.com, Michael Tsirkin , stable@vger.kernel.org References: <1500387145-4216-1-git-send-email-zuban32s@gmail.com> From: Marcel Apfelbaum Message-ID: Date: Tue, 1 Aug 2017 18:56:29 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-pci-owner@vger.kernel.org List-ID: On 19/07/2017 16:36, Marcel Apfelbaum wrote: > On 18/07/2017 17:12, Aleksandr Bezzubikov wrote: >> An MSI-based SHPC built in PCI bridges can configure hotplugged devices >> only if they notify the bridge with MSI. >> But they can't trigger interrupt without the bridge being busmaster, >> that's why it should be enabled. > > Hi Aleksandr, > > Hot-plugging an empty bridge does require making it bus-master, > otherwise we end up with an unusable pci brigde. > >> >> Signed-off-by: Aleksandr Bezzubikov >> --- >> drivers/pci/hotplug/shpchp_hpc.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/pci/hotplug/shpchp_hpc.c >> b/drivers/pci/hotplug/shpchp_hpc.c >> index de0ea47..e5824c7 100644 >> --- a/drivers/pci/hotplug/shpchp_hpc.c >> +++ b/drivers/pci/hotplug/shpchp_hpc.c >> @@ -1062,6 +1062,8 @@ int shpc_init(struct controller *ctrl, struct >> pci_dev *pdev) >> if (rc) { >> ctrl_info(ctrl, "Can't get msi for the hotplug >> controller\n"); >> ctrl_info(ctrl, "Use INTx for the hotplug controller\n"); >> + } else { >> + pci_set_master(pdev); >> } >> rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED, >> > > > I am not really familiar with the shpc code, > but the change looks OK to me. > > Reviewed-by: Marcel Apfelbaum > Hi, Since is a fix: Cc: stable@vger.kernel.org Thanks, Marcel > Thanks, > Marcel