Skip to content

Commit e2f1052

Browse files
Kalesh APrleon
authored andcommitted
RDMA/bnxt_re: Fix issue in the unload path
The cited comment removed the netdev notifier register call from the driver. But, it did not remove the cleanup code from the unload path. As a result, driver unload is not clean and resulted in undesired behaviour. Fixes: d3b15fc ("RDMA/bnxt_re: Remove deliver net device event") Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1738657285-23968-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent f0df225 commit e2f1052

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

drivers/infiniband/hw/bnxt_re/bnxt_re.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ struct bnxt_re_dev {
187187
#define BNXT_RE_FLAG_ISSUE_ROCE_STATS 29
188188
struct net_device *netdev;
189189
struct auxiliary_device *adev;
190-
struct notifier_block nb;
191190
unsigned int version, major, minor;
192191
struct bnxt_qplib_chip_ctx *chip_ctx;
193192
struct bnxt_en_dev *en_dev;

drivers/infiniband/hw/bnxt_re/main.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,6 @@ static struct bnxt_re_dev *bnxt_re_dev_add(struct auxiliary_device *adev,
13591359
return NULL;
13601360
}
13611361
/* Default values */
1362-
rdev->nb.notifier_call = NULL;
13631362
rdev->netdev = en_dev->net;
13641363
rdev->en_dev = en_dev;
13651364
rdev->adev = adev;
@@ -2354,15 +2353,6 @@ static int bnxt_re_add_device(struct auxiliary_device *adev, u8 op_type)
23542353
static void bnxt_re_remove_device(struct bnxt_re_dev *rdev, u8 op_type,
23552354
struct auxiliary_device *aux_dev)
23562355
{
2357-
if (rdev->nb.notifier_call) {
2358-
unregister_netdevice_notifier(&rdev->nb);
2359-
rdev->nb.notifier_call = NULL;
2360-
} else {
2361-
/* If notifier is null, we should have already done a
2362-
* clean up before coming here.
2363-
*/
2364-
return;
2365-
}
23662356
bnxt_re_setup_cc(rdev, false);
23672357
ib_unregister_device(&rdev->ibdev);
23682358
bnxt_re_dev_uninit(rdev, op_type);

0 commit comments

Comments
 (0)