aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hfi1/chip.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2018-03-23 02:33:52 +0000
committerAlex Shi <alex.shi@linaro.org>2018-03-23 02:33:52 +0000
commit323174b55ef1de0c70ed0b268fcaf9f2d6f842c6 (patch)
tree903ffc44d70b2adc60c4b067e696b9bf3039373a /drivers/infiniband/hw/hfi1/chip.c
parentba2e9dd8362bcdb75daa97b0bc7b06eb331521c8 (diff)
parenta779add58a837fbd5156e0fab0aca5e3b53754ef (diff)
Merge tag 'v4.9.89' into linux-linaro-lsk-v4.9
This is the 4.9.89 stable release
Diffstat (limited to 'drivers/infiniband/hw/hfi1/chip.c')
-rw-r--r--drivers/infiniband/hw/hfi1/chip.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
index 4682909b021b..3be62ef154d1 100644
--- a/drivers/infiniband/hw/hfi1/chip.c
+++ b/drivers/infiniband/hw/hfi1/chip.c
@@ -9489,8 +9489,11 @@ static int test_qsfp_read(struct hfi1_pportdata *ppd)
int ret;
u8 status;
- /* report success if not a QSFP */
- if (ppd->port_type != PORT_TYPE_QSFP)
+ /*
+ * Report success if not a QSFP or, if it is a QSFP, but the cable is
+ * not present
+ */
+ if (ppd->port_type != PORT_TYPE_QSFP || !qsfp_mod_present(ppd))
return 0;
/* read byte 2, the status byte */