From: Dean Luick Date: Thu, 14 Apr 2016 15:31:30 +0000 (-0700) Subject: IB/hfi1: Ignore link downgrade with 0 lanes X-Git-Tag: v4.14-rc1~3104^2~35^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9b5635cbe7bcacb94870e44387df133dd851b10;p=platform%2Fkernel%2Flinux-rpi.git IB/hfi1: Ignore link downgrade with 0 lanes Versions of the 8051 firmware < 0.38 may report a link failure as a link downgrade with a width of 0 followed by a link down notification. Ignore the zero width downgrade notification - the driver should follow the link down path. Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Doug Ledford --- diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c index 386309c6..f50f1b1 100644 --- a/drivers/staging/rdma/hfi1/chip.c +++ b/drivers/staging/rdma/hfi1/chip.c @@ -7336,7 +7336,11 @@ retry: ppd->link_width_downgrade_rx_active = rx; } - if (lwde == 0) { + if (ppd->link_width_downgrade_tx_active == 0 || + ppd->link_width_downgrade_rx_active == 0) { + /* the 8051 reported a dead link as a downgrade */ + dd_dev_err(ppd->dd, "Link downgrade is really a link down, ignoring\n"); + } else if (lwde == 0) { /* downgrade is disabled */ /* bounce if not at starting active width */