* Re: [PATCH] pci: shpchp: set the bridge busmaster if MSI are enabled
[not found] ` <b0c85887-38f1-337e-4cc4-d671a200ff7d@redhat.com>
@ 2017-08-01 15:56 ` Marcel Apfelbaum
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Apfelbaum @ 2017-08-01 15:56 UTC (permalink / raw)
To: Marcel Apfelbaum, Aleksandr Bezzubikov, linux-pci
Cc: bhelgaas, Michael Tsirkin, stable
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 <zuban32s@gmail.com>
>> ---
>> 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 <marcel@redhat.com>
>
Hi,
Since is a fix:
Cc: stable@vger.kernel.org
Thanks,
Marcel
> Thanks,
> Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: pci: shpchp: set the bridge busmaster if MSI are enabled
[not found] <1500387145-4216-1-git-send-email-zuban32s@gmail.com>
[not found] ` <b0c85887-38f1-337e-4cc4-d671a200ff7d@redhat.com>
@ 2017-08-01 15:57 ` Michael S. Tsirkin
1 sibling, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2017-08-01 15:57 UTC (permalink / raw)
To: Aleksandr Bezzubikov; +Cc: linux-pci, bhelgaas, marcel, stable
On Tue, Jul 18, 2017 at 05:12:25PM +0300, 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.
>
> Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Given there's pci_enable_msi above, not enabling bus master
seems like a very strange thing to do.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
This also looks like a good candidate for stable.
> ---
> 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,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-01 15:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1500387145-4216-1-git-send-email-zuban32s@gmail.com>
[not found] ` <b0c85887-38f1-337e-4cc4-d671a200ff7d@redhat.com>
2017-08-01 15:56 ` [PATCH] pci: shpchp: set the bridge busmaster if MSI are enabled Marcel Apfelbaum
2017-08-01 15:57 ` Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).