lkml.org 
[lkml]   [2013]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.11 033/272] powerpc/eeh: Enable PCI_COMMAND_MASTER for PCI bridges
    Date
    3.11.10.1 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Gavin Shan <shangw@linux.vnet.ibm.com>

    commit bf898ec5cbd33be11147743bee27b66b10cb2f85 upstream.

    On PHB3, we will fail to fetch IODA tables without PCI_COMMAND_MASTER
    on PCI bridges. According to one experiment I had, the MSIx interrupts
    didn't raise from the adapter without the bit applied to all upstream
    PCI bridges including root port of the adapter. The patch forces to
    have that bit enabled accordingly.

    Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
    ---
    arch/powerpc/kernel/eeh.c | 9 +++++++++
    1 file changed, 9 insertions(+)

    diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
    index 55593ee..c766cf5 100644
    --- a/arch/powerpc/kernel/eeh.c
    +++ b/arch/powerpc/kernel/eeh.c
    @@ -687,6 +687,15 @@ void eeh_save_bars(struct eeh_dev *edev)

    for (i = 0; i < 16; i++)
    eeh_ops->read_config(dn, i * 4, 4, &edev->config_space[i]);
    +
    + /*
    + * For PCI bridges including root port, we need enable bus
    + * master explicitly. Otherwise, it can't fetch IODA table
    + * entries correctly. So we cache the bit in advance so that
    + * we can restore it after reset, either PHB range or PE range.
    + */
    + if (edev->mode & EEH_DEV_BRIDGE)
    + edev->config_space[1] |= PCI_COMMAND_MASTER;
    }

    /**
    --
    1.8.3.2


    \
     
     \ /
      Last update: 2013-12-06 15:42    [W:7.259 / U:0.184 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site