[PATCH 3/3] pci/hotplug/pnv-php: Disable MSI and PCI device properly

Andrew Donnellan andrew.donnellan at au1.ibm.com
Thu Feb 16 15:45:00 AEDT 2017


On 16/02/17 10:22, Gavin Shan wrote:
> pnv_php_disable_irq() can be called in two paths: Bailing path in
> pnv_php_enable_irq() or releasing slot. The MSI (or MSIx) interrupts
> is disabled unconditionally in pnv_php_disable_irq(). It's wrong
> because that might be enabled by drivers other than pnv-php.
>
> This disables MSI (or MSIx) interrupts and the PCI device only if
> it was enabled by pnv-php. In the error path of pnv_php_enable_irq(),
> we rely on the newly added parameter @disable_device. In the path
> of releasing slot, @pnv_php->irq is checked.
>
> Cc: <stable at vger.kernel.org> # v4.9+
> Fixes: 360aebd85a4c ("drivers/pci/hotplug: Support surprise hotplug in powernv driver")
> Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>

Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Linuxppc-dev mailing list