[ofa-general] Re: [PATCH V2] mlx4: check for FW version which properly supports resize_cq

Roland Dreier rdreier at cisco.com
Wed Jul 8 08:58:59 PDT 2009


 > @@ -349,6 +349,9 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
 >  	int outst_cqe;
 >  	int err;
 >  
 > +	if (dev->dev->caps.fw_ver < MLX4_FW_VER_RESIZE_CQ)
 > +		return -ENOSYS;

This is kind of dopey, isn't it?  Seems cleaner just to leave the
resize_cq method unset if the hardware doesn't support it; then the core
takes care of this check for us.

 - R.



More information about the general mailing list