lkml.org 
[lkml]   [2019]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 4.20 098/105] mlxsw: pci: Return error on PCI reset timeout
    Date
    From: Nir Dotan <nird@mellanox.com>

    [ Upstream commit 67c14cc9b35055264fc0efed00159a7de1819f1b ]

    Return an appropriate error in the case when the driver timeouts on waiting
    for firmware to go out of PCI reset.

    Fixes: 233fa44bd67a ("mlxsw: pci: Implement reset done check")
    Signed-off-by: Nir Dotan <nird@mellanox.com>
    Acked-by: Jiri Pirko <jiri@mellanox.com>
    Signed-off-by: Ido Schimmel <idosch@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/mellanox/mlxsw/pci.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c
    index c7901a3f2a79..a903e97793f9 100644
    --- a/drivers/net/ethernet/mellanox/mlxsw/pci.c
    +++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c
    @@ -1367,10 +1367,10 @@ static int mlxsw_pci_sw_reset(struct mlxsw_pci *mlxsw_pci,
    u32 val = mlxsw_pci_read32(mlxsw_pci, FW_READY);

    if ((val & MLXSW_PCI_FW_READY_MASK) == MLXSW_PCI_FW_READY_MAGIC)
    - break;
    + return 0;
    cond_resched();
    } while (time_before(jiffies, end));
    - return 0;
    + return -EBUSY;
    }

    static int mlxsw_pci_alloc_irq_vectors(struct mlxsw_pci *mlxsw_pci)
    --
    2.19.1
    \
     
     \ /
      Last update: 2019-02-13 03:59    [W:4.982 / U:0.376 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site