[ofa-general] [PATCH] mlx4_ib/mthca: Fix dispatch of IB_EVENT_LID_CHANGE

Jack Morgenstein jackm at dev.mellanox.co.il
Thu Nov 27 05:51:46 PST 2008


On Thursday 27 November 2008 15:31, Moni Shoua wrote:
> @@ -263,6 +269,12 @@ int mlx4_ib_process_mad(struct ib_device *ibdev, int mad_flags,    u8 port_num,
>         } else
>                 return IB_MAD_RESULT_SUCCESS;
>  
> +       if ((in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
> +               in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) &&
> +               in_mad->mad_hdr.method == IB_MGMT_METHOD_SET &&
> +               !ib_query_port(ibdev, port_num, &pattr))
> +                       prev_lid = pattr.lid;
> +
>         err = mlx4_MAD_IFC(to_mdev(ibdev),
>                            mad_flags & IB_MAD_IGNORE_MKEY,
>                            mad_flags & IB_MAD_IGNORE_BKEY,
> 

Per my last post, this should be:

@@ -263,6 +269,13 @@ int mlx4_ib_process_mad(struct ib_device *ibdev, int mad_flags,    u8 port_num,
        } else
                return IB_MAD_RESULT_SUCCESS;
 
+       if ((in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
+               in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) &&
+               in_mad->mad_hdr.method == IB_MGMT_METHOD_SET &&
+               in_mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO &&
+               !ib_query_port(ibdev, port_num, &pattr))
+                       prev_lid = pattr.lid;
+
        err = mlx4_MAD_IFC(to_mdev(ibdev),
                           mad_flags & IB_MAD_IGNORE_MKEY,
                           mad_flags & IB_MAD_IGNORE_BKEY,



More information about the general mailing list