Commit 2c9f046b authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Refresh RoCE capabilities in bnxt_ulp_probe()

The capabilities can change after firmware upgrade/downgrade, so we
should get the up-to-date RoCE capabilities everytime bnxt_ulp_probe()
is called.

Fixes: 2151fe08 ("bnxt_en: Handle RESET_NOTIFY async event from firmware.")
Reviewed-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c08c5965
...@@ -479,16 +479,17 @@ struct bnxt_en_dev *bnxt_ulp_probe(struct net_device *dev) ...@@ -479,16 +479,17 @@ struct bnxt_en_dev *bnxt_ulp_probe(struct net_device *dev)
if (!edev) if (!edev)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
edev->en_ops = &bnxt_en_ops_tbl; edev->en_ops = &bnxt_en_ops_tbl;
if (bp->flags & BNXT_FLAG_ROCEV1_CAP)
edev->flags |= BNXT_EN_FLAG_ROCEV1_CAP;
if (bp->flags & BNXT_FLAG_ROCEV2_CAP)
edev->flags |= BNXT_EN_FLAG_ROCEV2_CAP;
edev->net = dev; edev->net = dev;
edev->pdev = bp->pdev; edev->pdev = bp->pdev;
edev->l2_db_size = bp->db_size; edev->l2_db_size = bp->db_size;
edev->l2_db_size_nc = bp->db_size; edev->l2_db_size_nc = bp->db_size;
bp->edev = edev; bp->edev = edev;
} }
edev->flags &= ~BNXT_EN_FLAG_ROCE_CAP;
if (bp->flags & BNXT_FLAG_ROCEV1_CAP)
edev->flags |= BNXT_EN_FLAG_ROCEV1_CAP;
if (bp->flags & BNXT_FLAG_ROCEV2_CAP)
edev->flags |= BNXT_EN_FLAG_ROCEV2_CAP;
return bp->edev; return bp->edev;
} }
EXPORT_SYMBOL(bnxt_ulp_probe); EXPORT_SYMBOL(bnxt_ulp_probe);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment