[openib-general] [PATCH] 2/3 [mthca] Added support to IB_EVENT_GID_CHANGE async event

Dotan Barak dotanb at dev.mellanox.co.il
Wed Nov 8 03:48:23 PST 2006


Added support to IB_EVENT_GID_CHANGE async event in mthca.

Signed-off-by: Dotan Barak <dotanb at mellanox.co.il>

---

Index: last_stable/drivers/infiniband/hw/mthca/mthca_mad.c
===================================================================
--- last_stable.orig/drivers/infiniband/hw/mthca/mthca_mad.c	2006-10-25 15:34:20.000000000 +0200
+++ last_stable/drivers/infiniband/hw/mthca/mthca_mad.c	2006-10-26 10:39:01.000000000 +0200
@@ -101,8 +101,8 @@ static void update_sm_ah(struct mthca_de
 }
 
 /*
- * Snoop SM MADs for port info and P_Key table sets, so we can
- * synthesize LID change and P_Key change events.
+ * Snoop SM MADs for port info, P_Key and GUID table sets, so we can
+ * synthesize LID change, P_Key change and GID change events.
  */
 static void smp_snoop(struct ib_device *ibdev,
 		      u8 port_num,
@@ -139,6 +139,13 @@ static void smp_snoop(struct ib_device *
 			event.element.port_num = port_num;
 			ib_dispatch_event(&event);
 		}
+
+		if (mad->mad_hdr.attr_id == IB_SMP_ATTR_GUID_INFO) {
+			event.device           = ibdev;
+			event.event            = IB_EVENT_GID_CHANGE;
+			event.element.port_num = port_num;
+			ib_dispatch_event(&event);
+		}
 	}
 }






More information about the general mailing list