Index: core/winmad/kernel/wm_reg.c
===================================================================
--- core/winmad/kernel/wm_reg.c	(revision 2404)
+++ core/winmad/kernel/wm_reg.c	(working copy)
@@ -89,11 +89,12 @@
 
 static NTSTATUS WmRegInit(WM_REGISTRATION *pRegistration, WM_IO_REGISTER *pAttributes)
 {
-	WM_IB_DEVICE	*dev;
-	ib_qp_create_t	attr;
-	ib_mad_svc_t	svc;
-	ib_api_status_t ib_status;
-	NTSTATUS		status;
+	WM_IB_DEVICE		*dev;
+	ib_qp_create_t		attr;
+	ib_mad_svc_t		svc;
+	ib_port_attr_mod_t	port_cap;
+	ib_api_status_t		ib_status;
+	NTSTATUS			status;
 
 	RtlZeroMemory(&attr, sizeof attr);
 	if (pAttributes->Qpn == 0) {
@@ -109,6 +110,7 @@
 		return STATUS_NO_SUCH_DEVICE;
 	}
 
+	pRegistration->PortNum = pAttributes->Port;
 	if (--pAttributes->Port > dev->PortCount) {
 		status = STATUS_INVALID_PORT_HANDLE;
 		goto err1;
@@ -161,6 +163,18 @@
 		goto err5;
 	}
 
+	if (svc.mgmt_class == IB_MCLASS_SUBN_DIR && svc.support_unsol) {
+		port_cap.cap.sm = 1;
+		ib_status = dev->IbInterface.modify_ca(pRegistration->hCa,
+											   pRegistration->PortNum,
+											   IB_CA_MOD_IS_SM, &port_cap);
+		if (ib_status != IB_SUCCESS) {
+			status = STATUS_UNSUCCESSFUL;
+			goto err5;
+		}
+		pRegistration->PortCapMask = IB_CA_MOD_IS_SM;
+	}
+
 	pRegistration->pDevice = dev;
 	return STATUS_SUCCESS;
 
@@ -270,10 +284,20 @@
 
 void WmRegRemoveHandler(WM_REGISTRATION *pRegistration)
 {
+	ib_port_attr_mod_t	port_cap;
+
 	if (pRegistration->pDevice == NULL) {
 		return;
 	}
 
+	if (pRegistration->PortCapMask) {
+		RtlZeroMemory(&port_cap.cap, sizeof(port_cap.cap));
+		pRegistration->pDevice->IbInterface.modify_ca(pRegistration->hCa,
+													  pRegistration->PortNum,
+													  pRegistration->PortCapMask,
+													  &port_cap);
+	}
+
 	WmProviderDeregister(pRegistration->pProvider, pRegistration);
 	pRegistration->pDevice->IbInterface.destroy_qp(pRegistration->hQp, NULL);
 	pRegistration->pDevice->IbInterface.dealloc_pd(pRegistration->hPd, NULL);
Index: core/winmad/kernel/wm_reg.h
===================================================================
--- core/winmad/kernel/wm_reg.h	(revision 2342)
+++ core/winmad/kernel/wm_reg.h	(working copy)
@@ -46,10 +46,12 @@
 
 	ib_al_handle_t			hIbal;
 	ib_ca_handle_t			hCa;
+	UINT8					PortNum;
 	ib_pd_handle_t			hPd;
 	ib_qp_handle_t			hQp;
 	ib_pool_key_t			hMadPool;
 	ib_mad_svc_handle_t		hService;
+	ib_ca_mod_t				PortCapMask;
 
 	SIZE_T					Id;
 	LONG					Ref;
Index: inc/kernel/iba/ib_al_ifc.h
===================================================================
--- inc/kernel/iba/ib_al_ifc.h	(revision 2342)
+++ inc/kernel/iba/ib_al_ifc.h	(working copy)
@@ -663,6 +663,7 @@
 	ib_pfn_sync_destroy_t		sync_destroy;
 	ib_pfn_open_ca_t			open_ca;
 	ib_pfn_query_ca_t			query_ca;
+	ib_pfn_modify_ca_t			modify_ca;
 	ib_pfn_get_ca_dev_t			get_dev;
 	ib_pfn_close_ca_t			close_ca;
 	ib_pfn_alloc_pd_t			alloc_pd;
@@ -769,6 +770,6 @@
  * on purpose so that it can be instantiated only once where it is actually
  * needed.  See the DDK docs section "Using GUIDs in Drivers" for more info.
  */
-/* {707A1BDE-BF9F-4565-8FDD-144EF6514FE8} */
+// {96234E89-496F-4dfb-AA90-FCE82BCEC8A8}
 DEFINE_GUID(GUID_IB_AL_INTERFACE, 
-0x707a1bde, 0xbf9f, 0x4565, 0x8f, 0xdd, 0x14, 0x4e, 0xf6, 0x51, 0x4f, 0xe8);
+0x96234e89, 0x496f, 0x4dfb, 0xaa, 0x90, 0xfc, 0xe8, 0x2b, 0xce, 0xc8, 0xa8);
