[ofw] [PATCH 6/?] Define interface version macros to make updating things easier.

Fab Tillier ftillier at microsoft.com
Mon Jun 18 18:56:59 PDT 2012


Signed-off-by: Fab Tillier <ftillier at microsoft.com>

Index: core/bus/kernel/bus_pnp.c
===================================================================
--- core/bus/kernel/bus_pnp.c	(revision 3414)
+++ core/bus/kernel/bus_pnp.c	(working copy)
@@ -1334,7 +1334,7 @@
 
 	BUS_ENTER( BUS_DBG_PNP );
 
-	if( p_io_stack->Parameters.QueryInterface.Version != IbaCmVersion(1, 0) )
+	if( p_io_stack->Parameters.QueryInterface.Version != INFINIBAND_INTERFACE_CM_VERSION )
 	{
 		BUS_TRACE_EXIT( BUS_DBG_PNP, ("Incorrect interface version (%d)\n",
 			p_io_stack->Parameters.QueryInterface.Version ) );
@@ -1353,7 +1353,7 @@
 	p_ifc = (INFINIBAND_INTERFACE_CM*)p_io_stack->Parameters.QueryInterface.Interface;
 
 	p_ifc->InterfaceHeader.Size = sizeof(INFINIBAND_INTERFACE_CM);
-	p_ifc->InterfaceHeader.Version = IbaCmVersion(1, 0);
+	p_ifc->InterfaceHeader.Version = INFINIBAND_INTERFACE_CM_VERSION;
 	p_ifc->InterfaceHeader.Context = p_dev_obj;
 	p_ifc->InterfaceHeader.InterfaceReference = al_ref_cm_ifc;
 	p_ifc->InterfaceHeader.InterfaceDereference = al_deref_cm_ifc;
@@ -1382,7 +1382,7 @@
 	*p_action = IrpSkip;
 
 	BUS_EXIT( BUS_DBG_PNP );
-	return STATUS_SUCCESS;;
+	return STATUS_SUCCESS;
 }
 
 #pragma alloc_text( PAGED , fdo_query_interface )
Index: core/winmad/kernel/wm_driver.c
===================================================================
--- core/winmad/kernel/wm_driver.c	(revision 3414)
+++ core/winmad/kernel/wm_driver.c	(working copy)
@@ -334,7 +334,7 @@
 	status = WdfFdoQueryForInterface(Device, &GUID_RDMA_INTERFACE_VERBS,
 									 (PINTERFACE) &dev->VerbsInterface,
  									 sizeof(dev->VerbsInterface), 
- 									 VerbsVersion(VERBS_MAJOR_VER, VERBS_MINOR_VER), 
+									 RDMA_INTERFACE_VERBS_VERSION,
 									 NULL);
 	if (!NT_SUCCESS(status)) {
 		return status;
Index: core/winverbs/kernel/wv_driver.c
===================================================================
--- core/winverbs/kernel/wv_driver.c	(revision 3414)
+++ core/winverbs/kernel/wv_driver.c	(working copy)
@@ -503,7 +503,7 @@
 	status = WdfFdoQueryForInterface(Device, &GUID_RDMA_INTERFACE_VERBS,
 									 (PINTERFACE) &dev->Interface,
 									 sizeof(dev->Interface), 
-									 VerbsVersion(VERBS_MAJOR_VER, VERBS_MINOR_VER), 
+									 RDMA_INTERFACE_VERBS_VERSION,
 									 NULL);
 	if (!NT_SUCCESS(status)) {
 		return status;
@@ -520,7 +520,7 @@
 		status = WdfFdoQueryForInterface(Device, &GUID_INFINIBAND_INTERFACE_CM,
 										 (PINTERFACE) &IbCmInterface,
 										 sizeof(IbCmInterface),
-										 IbaCmVersion(1, 0), NULL);
+										 INFINIBAND_INTERFACE_CM_VERSION, NULL);
 	}
 
 	return status;
Index: inc/kernel/iba/ib_cm_ifc.h
===================================================================
--- inc/kernel/iba/ib_cm_ifc.h	(revision 3414)
+++ inc/kernel/iba/ib_cm_ifc.h	(working copy)
@@ -302,6 +302,8 @@
 	return (UINT8) Version;
 }
 
+#define INFINIBAND_INTERFACE_CM_VERSION IbaCmVersion(1,0)
+
 typedef struct _INFINIBAND_INTERFACE_CM
 {
 	INTERFACE			InterfaceHeader;
Index: inc/kernel/rdma/verbs.h
===================================================================
--- inc/kernel/rdma/verbs.h	(revision 3414)
+++ inc/kernel/rdma/verbs.h	(working copy)
@@ -49,6 +49,8 @@
 	return (UINT8) Version;
 }
 
+#define RDMA_INTERFACE_VERBS_VERSION VerbsVersion(VERBS_MAJOR_VER, VERBS_MINOR_VER)
+
 DEFINE_GUID(GUID_RDMA_INTERFACE_VERBS, 0xf0ebae86, 0xedb5, 0x4b40,
 			0xa1, 0xa, 0x44, 0xd5, 0xdb, 0x3b, 0x96, 0x4e);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6.ifc_version.patch
Type: application/octet-stream
Size: 3494 bytes
Desc: 6.ifc_version.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20120619/9c549aa9/attachment.obj>


More information about the ofw mailing list