From bff14bb66c583376ff8c5dd6294796f6fc3c1dde Mon Sep 17 00:00:00 2001 From: Dean Luick Date: Thu, 17 Dec 2015 19:24:13 -0500 Subject: [PATCH] staging/rdma/hfi1: Remove incorrect link credit check Remove an invalid sanity check that compares the local link credits with the peer link credits. The two have no dependency on each other. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rdma/hfi1/chip.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c index ec4bac00dbda..bbe5ad85cec0 100644 --- a/drivers/staging/rdma/hfi1/chip.c +++ b/drivers/staging/rdma/hfi1/chip.c @@ -10496,8 +10496,7 @@ static int set_buffer_control(struct hfi1_devdata *dd, new_bc->vl[i].shared = 0; } new_total += be16_to_cpu(new_bc->overall_shared_limit); - if (new_total > (u32)dd->link_credits) - return -EINVAL; + /* fetch the current values */ get_buffer_control(dd, &cur_bc, &cur_total); -- 2.20.1