Skip to content

Commit a27c6f4

Browse files
Kalesh APrleon
authored andcommitted
RDMA/bnxt_re: Fix an issue in bnxt_re_async_notifier
In the bnxt_re_async_notifier() callback, the way driver retrieves rdev pointer is wrong. The rdev pointer should be parsed from adev pointer as while registering with the L2 for ULP, driver uses the aux device pointer for the handle. Fixes: 7fea327 ("RDMA/bnxt_re: Add Async event handling support") 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-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 9747c0c commit a27c6f4

File tree

1 file changed

+6
-1
lines changed
  • drivers/infiniband/hw/bnxt_re

1 file changed

+6
-1
lines changed

drivers/infiniband/hw/bnxt_re/main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,16 @@ static void bnxt_re_dcb_wq_task(struct work_struct *work)
396396

397397
static void bnxt_re_async_notifier(void *handle, struct hwrm_async_event_cmpl *cmpl)
398398
{
399-
struct bnxt_re_dev *rdev = (struct bnxt_re_dev *)handle;
399+
struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(handle);
400400
struct bnxt_re_dcb_work *dcb_work;
401+
struct bnxt_re_dev *rdev;
401402
u32 data1, data2;
402403
u16 event_id;
403404

405+
rdev = en_info->rdev;
406+
if (!rdev)
407+
return;
408+
404409
event_id = le16_to_cpu(cmpl->event_id);
405410
data1 = le32_to_cpu(cmpl->event_data1);
406411
data2 = le32_to_cpu(cmpl->event_data2);

0 commit comments

Comments
 (0)