[Openib-windows] [PATCH] port num

Yossi Leybovich sleybo at mellanox.co.il
Sun Dec 11 08:17:34 PST 2005


Fab
 
I know its just for debug but....
This patch retrive the port number from the bus ifc and store it in the
adapter context.
Now the debug prints show the right port.

10x
Yossi 
 
singed-off-by: Yossi Leybovich (sleybo at mellanox.co.il)

Index: core/bus/kernel/bus_port_mgr.c
===================================================================
--- core/bus/kernel/bus_port_mgr.c	(revision 814)
+++ core/bus/kernel/bus_port_mgr.c	(working copy)
@@ -1187,7 +1187,7 @@
 
 	p_ipoib_data->ca_guid =
p_ext->pdo.h_ca->obj.p_ci_ca->verbs.guid;
 	p_ipoib_data->port_guid = p_ext->port_guid;
-
+	p_ipoib_data->n_port = (uint8_t)p_ext->n_port;
 	BUS_EXIT( BUS_DBG_PNP );
 	return STATUS_SUCCESS;
 }
Index: inc/kernel/iba/ipoib_ifc.h
===================================================================
--- inc/kernel/iba/ipoib_ifc.h	(revision 814)
+++ inc/kernel/iba/ipoib_ifc.h	(working copy)
@@ -60,6 +60,7 @@
 	/* HCA and Port GUID */
 	net64_t						ca_guid;
 	net64_t						port_guid;
+	uint8_t						n_port;
 
 }	ipoib_ifc_data_t;
 
Index: ulp/ipoib/kernel/ipoib_adapter.h
===================================================================
--- ulp/ipoib/kernel/ipoib_adapter.h	(revision 814)
+++ ulp/ipoib/kernel/ipoib_adapter.h	(working copy)
@@ -59,7 +59,7 @@
  * Macros
  */
 #define IPOIB_GET_PORT_NUM_FROM_GUID( __guid__ ) ( ((uint8_t
*)&(__guid__))[PORT_NUM_INDEX_IN_GUID] + 1 )
-#define IPOIB_ADAPTER_GET_PORT_NUM(__p_adapter__) (
IPOIB_GET_PORT_NUM_FROM_GUID( (__p_adapter__)->guids.port_guid ) )
+#define IPOIB_ADAPTER_GET_PORT_NUM(__p_adapter__) (
(__p_adapter__)->guids.n_port )
 
 
 typedef struct _ipoib_params
-------------- next part --------------
A non-text attachment was scrubbed...
Name: port_num.patch
Type: application/octet-stream
Size: 1417 bytes
Desc: port_num.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20051211/9efd6976/attachment.obj>


More information about the ofw mailing list