Return the active width in the port attributes reported by the HCA.
Because the kernel and user space share the same source files, to avoid
breaking the API, return the active width in the link_width_supported
field, which is currently left uninitialized.

This fix allows reporting the correct values through the libibverbs 
port and ibv_devinfo example utility.

Signed-off-by: Sean Hefty <[email protected]>
---
I can commit this with similar changes to winverbs to pick this value
up.  This is not critical, so would not be added to the 2.1 release.

diff -up -r -X \mshefty\scm\winof\trunk\docs\dontdiff.txt -I '\$Id:' 
trunk\hw/mlx4/kernel/hca/data.c
branches\winverbs\hw/mlx4/kernel/hca/data.c
--- trunk\hw/mlx4/kernel/hca/data.c     2009-06-11 10:33:38.377375000 -0700
+++ branches\winverbs\hw/mlx4/kernel/hca/data.c 2009-08-12 14:57:04.367506600 
-0700
@@ -347,6 +347,7 @@ from_hca_cap(
                        ibal_port_p->max_msg_size = mthca_port_p->max_msg_sz;
                        ibal_port_p->mtu = (uint8_t)mthca_port_p->max_mtu;
                        ibal_port_p->active_speed = mthca_port_p->active_speed;
+                       ibal_port_p->link_width_supported = 
mthca_port_p->active_width;
                        ibal_port_p->phys_state = mthca_port_p->phys_state;
 
                        ibal_port_p->subnet_timeout = 
mthca_port_p->subnet_timeout;
diff -up -r -X \mshefty\scm\winof\trunk\docs\dontdiff.txt -I '\$Id:' 
trunk\hw/mthca/kernel/hca_data.c
branches\winverbs\hw/mthca/kernel/hca_data.c
--- trunk\hw/mthca/kernel/hca_data.c    2009-06-11 10:33:47.846125000 -0700
+++ branches\winverbs\hw/mthca/kernel/hca_data.c        2009-08-12 
14:57:05.555029400 -0700
@@ -323,6 +323,7 @@ mlnx_conv_hca_cap(
                ibal_port_p->max_msg_size = mthca_port_p->max_msg_sz;
                ibal_port_p->mtu = (uint8_t)mthca_port_p->max_mtu;
                ibal_port_p->active_speed = mthca_port_p->active_speed;
+               ibal_port_p->link_width_supported = mthca_port_p->active_width;
                ibal_port_p->phys_state = mthca_port_p->phys_state;
 
                ibal_port_p->subnet_timeout = mthca_port_p->subnet_timeout;


_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to