lkml.org 
[lkml]   [2019]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 347/350] RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series
    Date
    From: Luke Starrett <luke.starrett@broadcom.com>

    [ Upstream commit e284b159c6881c8bec9713daba2653268f4c4948 ]

    In the first version of Gen P5 ASIC, chip-id was always set to 0x1750 for
    all adaptor port configurations. This has been fixed in the new chip rev.

    Due to this missing fix users are not able to use adaptors based on latest
    chip rev of Broadcom's Gen P5 adaptors.

    Fixes: ae8637e13185 ("RDMA/bnxt_re: Add chip context to identify 57500 series")
    Link: https://lore.kernel.org/r/1574317343-23300-2-git-send-email-devesh.sharma@broadcom.com
    Signed-off-by: Naresh Kumar PBS <nareshkumar.pbs@broadcom.com>
    Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
    Signed-off-by: Luke Starrett <luke.starrett@broadcom.com>
    Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/infiniband/hw/bnxt_re/qplib_res.h | 8 ++++++--
    1 file changed, 6 insertions(+), 2 deletions(-)

    diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.h b/drivers/infiniband/hw/bnxt_re/qplib_res.h
    index fbda11a7ab1aa..aaa76d7921857 100644
    --- a/drivers/infiniband/hw/bnxt_re/qplib_res.h
    +++ b/drivers/infiniband/hw/bnxt_re/qplib_res.h
    @@ -186,7 +186,9 @@ struct bnxt_qplib_chip_ctx {
    u8 chip_metal;
    };

    -#define CHIP_NUM_57500 0x1750
    +#define CHIP_NUM_57508 0x1750
    +#define CHIP_NUM_57504 0x1751
    +#define CHIP_NUM_57502 0x1752

    struct bnxt_qplib_res {
    struct pci_dev *pdev;
    @@ -203,7 +205,9 @@ struct bnxt_qplib_res {

    static inline bool bnxt_qplib_is_chip_gen_p5(struct bnxt_qplib_chip_ctx *cctx)
    {
    - return (cctx->chip_num == CHIP_NUM_57500);
    + return (cctx->chip_num == CHIP_NUM_57508 ||
    + cctx->chip_num == CHIP_NUM_57504 ||
    + cctx->chip_num == CHIP_NUM_57502);
    }

    static inline u8 bnxt_qplib_get_hwq_type(struct bnxt_qplib_res *res)
    --
    2.20.1
    \
     
     \ /
      Last update: 2019-12-10 22:14    [W:4.025 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site