RDMA/bnxt_re: Create direct symbol link between bnxt modules
Convert indirect probe call to its direct equivalent to create a symbol link between RDMA and netdev modules. This will give us an ability to remove custom module reference counting that doesn't belong to the driver. Link: https://lore.kernel.org/r/20210401065715.565226-3-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Acked-By: Devesh Sharma <devesh.sharma@broadcom.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
committed by
Jason Gunthorpe
parent
ae9884829c
commit
bcf9ee0520
@@ -610,15 +610,10 @@ static void bnxt_re_dev_unprobe(struct net_device *netdev,
|
|||||||
|
|
||||||
static struct bnxt_en_dev *bnxt_re_dev_probe(struct net_device *netdev)
|
static struct bnxt_en_dev *bnxt_re_dev_probe(struct net_device *netdev)
|
||||||
{
|
{
|
||||||
struct bnxt *bp = netdev_priv(netdev);
|
|
||||||
struct bnxt_en_dev *en_dev;
|
struct bnxt_en_dev *en_dev;
|
||||||
struct pci_dev *pdev;
|
struct pci_dev *pdev;
|
||||||
|
|
||||||
/* Call bnxt_en's RoCE probe via indirect API */
|
en_dev = bnxt_ulp_probe(netdev);
|
||||||
if (!bp->ulp_probe)
|
|
||||||
return ERR_PTR(-EINVAL);
|
|
||||||
|
|
||||||
en_dev = bp->ulp_probe(netdev);
|
|
||||||
if (IS_ERR(en_dev))
|
if (IS_ERR(en_dev))
|
||||||
return en_dev;
|
return en_dev;
|
||||||
|
|
||||||
|
|||||||
@@ -12859,8 +12859,6 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
if (!BNXT_CHIP_P4_PLUS(bp))
|
if (!BNXT_CHIP_P4_PLUS(bp))
|
||||||
bp->flags |= BNXT_FLAG_DOUBLE_DB;
|
bp->flags |= BNXT_FLAG_DOUBLE_DB;
|
||||||
|
|
||||||
bp->ulp_probe = bnxt_ulp_probe;
|
|
||||||
|
|
||||||
rc = bnxt_init_mac_addr(bp);
|
rc = bnxt_init_mac_addr(bp);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dev_err(&pdev->dev, "Unable to initialize mac address.\n");
|
dev_err(&pdev->dev, "Unable to initialize mac address.\n");
|
||||||
|
|||||||
@@ -1745,7 +1745,6 @@ struct bnxt {
|
|||||||
(BNXT_CHIP_P4(bp) || BNXT_CHIP_P5(bp))
|
(BNXT_CHIP_P4(bp) || BNXT_CHIP_P5(bp))
|
||||||
|
|
||||||
struct bnxt_en_dev *edev;
|
struct bnxt_en_dev *edev;
|
||||||
struct bnxt_en_dev * (*ulp_probe)(struct net_device *);
|
|
||||||
|
|
||||||
struct bnxt_napi **bnapi;
|
struct bnxt_napi **bnapi;
|
||||||
|
|
||||||
|
|||||||
@@ -491,3 +491,4 @@ struct bnxt_en_dev *bnxt_ulp_probe(struct net_device *dev)
|
|||||||
}
|
}
|
||||||
return bp->edev;
|
return bp->edev;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(bnxt_ulp_probe);
|
||||||
|
|||||||
Reference in New Issue
Block a user