diff options
Diffstat (limited to 'drivers/staging/rdma/hfi1/qsfp.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/qsfp.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/staging/rdma/hfi1/qsfp.c b/drivers/staging/rdma/hfi1/qsfp.c index 3138936..ffdb1d7 100644 --- a/drivers/staging/rdma/hfi1/qsfp.c +++ b/drivers/staging/rdma/hfi1/qsfp.c @@ -403,16 +403,11 @@ static const char *pwr_codes = "1.5W2.0W2.5W3.5W"; int qsfp_mod_present(struct hfi1_pportdata *ppd) { - if (HFI1_CAP_IS_KSET(QSFP_ENABLED)) { - struct hfi1_devdata *dd = ppd->dd; - u64 reg; + struct hfi1_devdata *dd = ppd->dd; + u64 reg; - reg = read_csr(dd, - dd->hfi1_id ? ASIC_QSFP2_IN : ASIC_QSFP1_IN); - return !(reg & QSFP_HFI0_MODPRST_N); - } - /* always return cable present */ - return 1; + reg = read_csr(dd, dd->hfi1_id ? ASIC_QSFP2_IN : ASIC_QSFP1_IN); + return !(reg & QSFP_HFI0_MODPRST_N); } /* |