[ofw] ipoib patch - add support for another series of Mellanox guids.
Tzachi Dar
tzachid at mellanox.co.il
Sun Jun 29 05:49:53 PDT 2008
Index: Q:/openib/trunk/ulp/ipoib/kernel/ipoib_xfr_mgr.h
===================================================================
--- Q:/openib/trunk/ulp/ipoib/kernel/ipoib_xfr_mgr.h (revision 1301)
+++ Q:/openib/trunk/ulp/ipoib/kernel/ipoib_xfr_mgr.h (working copy)
@@ -207,21 +207,24 @@
{
const uint8_t *p_guid = (const uint8_t*)&port_guid;
uint32_t low24;
+ net16_t guid_middle;
/* Port guid is in network byte order. OUI is in lower 3 bytes. */
ASSERT( p_guid[0] == 0x00 && p_guid[1] == 0x02 && p_guid[2] == 0xc9 );
- if( (port_guid & CL_HTON64( 0x000000ffff000000 )) !=
- CL_HTON64(0x0000000200000000))
- {
+ guid_middle = (net16_t)((port_guid & CL_HTON64( 0x000000ffff000000 ))
>>24);
+
+ if (guid_middle == 2) {
+ p_mac_addr->addr[2] = 0xc9;
+ } else if (guid_middle == 3) {
+ p_mac_addr->addr[2] = 0xca;
+ } else {
return IB_INVALID_GUID;
}
-
low24 = ((uint32_t)cl_ntoh64( port_guid ) & 0x00FFFFFF);
p_mac_addr->addr[0] = p_guid[0];
p_mac_addr->addr[1] = p_guid[1];
- p_mac_addr->addr[2] = p_guid[2];
p_mac_addr->addr[3] = (uint8_t)(low24 >> 16);
p_mac_addr->addr[4] = (uint8_t)(low24 >> 8);
p_mac_addr->addr[5] = (uint8_t)low24;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080629/876382ad/attachment.html>
More information about the ofw
mailing list