Sorry, missed this mail.

It's OK as a quick-n-dirty solution. 
The question is why it should be that quick.
We can change QUERY_CA API for the next release so it will contain some
other worthy values (without misusing the field).
You can see them in 'vstat -m' output:

        Supported_link_speed=2.5 Gbps (1), 5.0 Gbps (2),
      Supported_link_width=1x (1), 4x (2),
      Enabled_link_speed=2.5 Gbps (1), 5.0 Gbps (2),
      Enabled_link_width=1x (1), 4x (2),
        Active_link_speed=5.0 Gbps (2),
        Active_link_width=4x (2),
  

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Sean Hefty
> Sent: Thursday, August 13, 2009 1:40 AM
> To: Hefty, Sean; [email protected]
> Subject: [ofw] [PATCH] mlx/mthca: report active width as part 
> of portattributes
> 
> 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
> 
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to