diff options
| author | Konstantin Taranov <[email protected]> | 2025-05-07 15:59:02 +0000 |
|---|---|---|
| committer | Leon Romanovsky <[email protected]> | 2025-05-12 10:44:52 +0000 |
| commit | ced82fce77e93315239f54caebbc88e263078e31 (patch) | |
| tree | 5b49a821721666ef0f1cf1330d8a7e240c228e24 /drivers/net/ethernet/microsoft/mana/gdma_main.c | |
| parent | RDMA/siw: replace redundant ternary operator with just rv (diff) | |
| download | kernel-ced82fce77e93315239f54caebbc88e263078e31.tar.gz kernel-ced82fce77e93315239f54caebbc88e263078e31.zip | |
net: mana: Probe rdma device in mana driver
Initialize gdma device for rdma inside mana module.
For each gdma device, initialize an auxiliary ib device.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/microsoft/mana/gdma_main.c')
| -rw-r--r-- | drivers/net/ethernet/microsoft/mana/gdma_main.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c index 8ee1aa3a7ec3..59e7814f0b70 100644 --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c @@ -1005,7 +1005,6 @@ int mana_gd_register_device(struct gdma_dev *gd) return 0; } -EXPORT_SYMBOL_NS(mana_gd_register_device, "NET_MANA"); int mana_gd_deregister_device(struct gdma_dev *gd) { @@ -1036,7 +1035,6 @@ int mana_gd_deregister_device(struct gdma_dev *gd) return err; } -EXPORT_SYMBOL_NS(mana_gd_deregister_device, "NET_MANA"); u32 mana_gd_wq_avail_space(struct gdma_queue *wq) { @@ -1579,8 +1577,14 @@ static int mana_gd_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (err) goto cleanup_gd; + err = mana_rdma_probe(&gc->mana_ib); + if (err) + goto cleanup_mana; + return 0; +cleanup_mana: + mana_remove(&gc->mana, false); cleanup_gd: mana_gd_cleanup(pdev); unmap_bar: @@ -1608,6 +1612,7 @@ static void mana_gd_remove(struct pci_dev *pdev) { struct gdma_context *gc = pci_get_drvdata(pdev); + mana_rdma_remove(&gc->mana_ib); mana_remove(&gc->mana, false); mana_gd_cleanup(pdev); @@ -1631,6 +1636,7 @@ static int mana_gd_suspend(struct pci_dev *pdev, pm_message_t state) { struct gdma_context *gc = pci_get_drvdata(pdev); + mana_rdma_remove(&gc->mana_ib); mana_remove(&gc->mana, true); mana_gd_cleanup(pdev); @@ -1655,6 +1661,10 @@ static int mana_gd_resume(struct pci_dev *pdev) if (err) return err; + err = mana_rdma_probe(&gc->mana_ib); + if (err) + return err; + return 0; } @@ -1665,6 +1675,7 @@ static void mana_gd_shutdown(struct pci_dev *pdev) dev_info(&pdev->dev, "Shutdown was called\n"); + mana_rdma_remove(&gc->mana_ib); mana_remove(&gc->mana, true); mana_gd_cleanup(pdev); |
