diff options
Diffstat (limited to 'drivers/infiniband/hw/hfi1/mad.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/mad.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c index 219029576ba0..fca07a1d6c28 100644 --- a/drivers/infiniband/hw/hfi1/mad.c +++ b/drivers/infiniband/hw/hfi1/mad.c | |||
@@ -78,6 +78,16 @@ static inline void clear_opa_smp_data(struct opa_smp *smp) | |||
78 | memset(data, 0, size); | 78 | memset(data, 0, size); |
79 | } | 79 | } |
80 | 80 | ||
81 | void hfi1_event_pkey_change(struct hfi1_devdata *dd, u8 port) | ||
82 | { | ||
83 | struct ib_event event; | ||
84 | |||
85 | event.event = IB_EVENT_PKEY_CHANGE; | ||
86 | event.device = &dd->verbs_dev.rdi.ibdev; | ||
87 | event.element.port_num = port; | ||
88 | ib_dispatch_event(&event); | ||
89 | } | ||
90 | |||
81 | static void send_trap(struct hfi1_ibport *ibp, void *data, unsigned len) | 91 | static void send_trap(struct hfi1_ibport *ibp, void *data, unsigned len) |
82 | { | 92 | { |
83 | struct ib_mad_send_buf *send_buf; | 93 | struct ib_mad_send_buf *send_buf; |
@@ -1418,15 +1428,10 @@ static int set_pkeys(struct hfi1_devdata *dd, u8 port, u16 *pkeys) | |||
1418 | } | 1428 | } |
1419 | 1429 | ||
1420 | if (changed) { | 1430 | if (changed) { |
1421 | struct ib_event event; | ||
1422 | |||
1423 | (void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_PKEYS, 0); | 1431 | (void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_PKEYS, 0); |
1424 | 1432 | hfi1_event_pkey_change(dd, port); | |
1425 | event.event = IB_EVENT_PKEY_CHANGE; | ||
1426 | event.device = &dd->verbs_dev.rdi.ibdev; | ||
1427 | event.element.port_num = port; | ||
1428 | ib_dispatch_event(&event); | ||
1429 | } | 1433 | } |
1434 | |||
1430 | return 0; | 1435 | return 0; |
1431 | } | 1436 | } |
1432 | 1437 | ||