[PATCH] IB/ipath: share more common code between RC and UC protocols