diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_mad.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mad.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mad.c b/drivers/infiniband/hw/mthca/mthca_mad.c index 4730863ece9a..d9bc030bcccc 100644 --- a/drivers/infiniband/hw/mthca/mthca_mad.c +++ b/drivers/infiniband/hw/mthca/mthca_mad.c | |||
@@ -114,14 +114,22 @@ static void smp_snoop(struct ib_device *ibdev, | |||
114 | mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) && | 114 | mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) && |
115 | mad->mad_hdr.method == IB_MGMT_METHOD_SET) { | 115 | mad->mad_hdr.method == IB_MGMT_METHOD_SET) { |
116 | if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO) { | 116 | if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO) { |
117 | struct ib_port_info *pinfo = | ||
118 | (struct ib_port_info *) ((struct ib_smp *) mad)->data; | ||
119 | |||
117 | mthca_update_rate(to_mdev(ibdev), port_num); | 120 | mthca_update_rate(to_mdev(ibdev), port_num); |
118 | update_sm_ah(to_mdev(ibdev), port_num, | 121 | update_sm_ah(to_mdev(ibdev), port_num, |
119 | be16_to_cpup((__be16 *) (mad->data + 58)), | 122 | be16_to_cpu(pinfo->lid), |
120 | (*(u8 *) (mad->data + 76)) & 0xf); | 123 | pinfo->neighbormtu_mastersmsl & 0xf); |
121 | 124 | ||
122 | event.device = ibdev; | 125 | event.device = ibdev; |
123 | event.event = IB_EVENT_LID_CHANGE; | ||
124 | event.element.port_num = port_num; | 126 | event.element.port_num = port_num; |
127 | |||
128 | if(pinfo->clientrereg_resv_subnetto & 0x80) | ||
129 | event.event = IB_EVENT_CLIENT_REREGISTER; | ||
130 | else | ||
131 | event.event = IB_EVENT_LID_CHANGE; | ||
132 | |||
125 | ib_dispatch_event(&event); | 133 | ib_dispatch_event(&event); |
126 | } | 134 | } |
127 | 135 | ||