]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
ib/core: report active width with port attributes.
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 20 Aug 2009 18:43:13 +0000 (18:43 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 20 Aug 2009 18:43:13 +0000 (18:43 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@2377 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/winverbs/core/winverbs/kernel/wv_device.c
branches/winverbs/hw/mlx4/kernel/hca/data.c
branches/winverbs/hw/mthca/kernel/hca_data.c
branches/winverbs/inc/iba/ib_types.h

index cd97ae05a692bb1acde6f8a6fdf67d6d8d7751be..5cc20bd6f1047e9dc9cdfc27f8675a13be1505bc 100644 (file)
@@ -517,7 +517,7 @@ static void WvConvertPortAttr(WV_IO_PORT_ATTRIBUTES *pAttributes,
 {\r
        WvConvertPortCap(&pAttributes->PortCabilityFlags, &pPortAttr->cap);\r
        pAttributes->State                      = pPortAttr->link_state;\r
-       pAttributes->MaxMtu                     = 0;    // TODO: missing in ib_port_attr_t\r
+       pAttributes->MaxMtu                     = 0x80 << pPortAttr->mtu;\r
        pAttributes->ActiveMtu          = 0x80 << pPortAttr->mtu;\r
        pAttributes->GidTableLength     = pPortAttr->num_gids;\r
        pAttributes->MaxMessageSize     = (UINT32) pPortAttr->max_msg_size;\r
@@ -531,9 +531,9 @@ static void WvConvertPortAttr(WV_IO_PORT_ATTRIBUTES *pAttributes,
        pAttributes->SmSl                       = pPortAttr->sm_sl;\r
        pAttributes->SubnetTimeout      = pPortAttr->subnet_timeout;\r
        pAttributes->InitTypeReply      = pPortAttr->init_type_reply;\r
-       pAttributes->ActiveWidth        = pPortAttr->link_width_supported;\r
-       pAttributes->ActiveSpeed        = 0;    // TODO: missing in ib_port_attr_t\r
-       pAttributes->PhysicalState      = 0;    // TODO: missing in ib_port_attr_t\r
+       pAttributes->ActiveWidth        = pPortAttr->active_width;\r
+       pAttributes->ActiveSpeed        = pPortAttr->active_speed;\r
+       pAttributes->PhysicalState      = pPortAttr->phys_state;\r
        pAttributes->Reserved[0]        = 0;\r
        pAttributes->Reserved[1]        = 0;\r
 }\r
index 23f42800cb18b921d3f9ea5c8562f6ec2780e279..91df60dd7fc9e94f458baccd07c9c5995d645950 100644 (file)
@@ -347,6 +347,7 @@ from_hca_cap(
                        ibal_port_p->max_msg_size = mthca_port_p->max_msg_sz;\r
                        ibal_port_p->mtu = (uint8_t)mthca_port_p->max_mtu;\r
                        ibal_port_p->active_speed = mthca_port_p->active_speed;\r
+                       ibal_port_p->active_width = mthca_port_p->active_width;\r
                        ibal_port_p->phys_state = mthca_port_p->phys_state;\r
 \r
                        ibal_port_p->subnet_timeout = mthca_port_p->subnet_timeout;\r
index 92a39187136c1631598b2761257bf84c8b7808d9..f3d002b6e9f04d91af1d6eb3304edebfd4937545 100644 (file)
@@ -323,6 +323,7 @@ mlnx_conv_hca_cap(
                ibal_port_p->max_msg_size = mthca_port_p->max_msg_sz;\r
                ibal_port_p->mtu = (uint8_t)mthca_port_p->max_mtu;\r
                ibal_port_p->active_speed = mthca_port_p->active_speed;\r
+               ibal_port_p->active_width = mthca_port_p->active_width;\r
                ibal_port_p->phys_state = mthca_port_p->phys_state;\r
 \r
                ibal_port_p->subnet_timeout = mthca_port_p->subnet_timeout;\r
index 74d16c6ccdaec4b3996c16a3c8fca3e9db9d3ec3..81922f2b69b78784efcb6966e8e23730dfa3458f 100644 (file)
@@ -8724,11 +8724,7 @@ typedef struct _ib_port_attr
        ib_net16_t                              lid;\r
        uint8_t                                 lmc;\r
 \r
-       /*\r
-        * LinkWidthSupported as defined in PortInfo.  Required to calculate\r
-        * inter-packet delay (a.k.a. static rate).\r
-        */\r
-       uint8_t                                 link_width_supported;\r
+       uint8_t                                 active_width;\r
 \r
        uint16_t                                max_vls;\r
 \r