Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging/rdma/hfi1: Remove QSFP_ENABLED from HFI capability mask

The QSFP interface code has been running without issues and the flag is
never set to off. This patch removes the QSFP_ENABLED bit from HFI1_CAP.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Easwar Hariharan and committed by
Greg Kroah-Hartman
3c2f85b8 25d97dd5

+7 -15
+1 -2
drivers/staging/rdma/hfi1/chip.c
··· 5714 5714 u64 qsfp_mask; 5715 5715 5716 5716 if (loopback == LOOPBACK_SERDES || loopback == LOOPBACK_LCB || 5717 - ppd->dd->icode == ICODE_FUNCTIONAL_SIMULATOR || 5718 - !HFI1_CAP_IS_KSET(QSFP_ENABLED)) { 5717 + ppd->dd->icode == ICODE_FUNCTIONAL_SIMULATOR) { 5719 5718 ppd->driver_link_ready = 1; 5720 5719 return; 5721 5720 }
-2
drivers/staging/rdma/hfi1/common.h
··· 147 147 HFI1_CAP_USE_SDMA_HEAD | \ 148 148 HFI1_CAP_EXTENDED_PSN | \ 149 149 HFI1_CAP_PRINT_UNIMPL | \ 150 - HFI1_CAP_QSFP_ENABLED | \ 151 150 HFI1_CAP_NO_INTEGRITY | \ 152 151 HFI1_CAP_PKEY_CHECK) << \ 153 152 HFI1_CAP_USER_SHIFT) ··· 162 163 HFI1_CAP_SDMA | \ 163 164 HFI1_CAP_PRINT_UNIMPL | \ 164 165 HFI1_CAP_STATIC_RATE_CTRL | \ 165 - HFI1_CAP_QSFP_ENABLED | \ 166 166 HFI1_CAP_PKEY_CHECK | \ 167 167 HFI1_CAP_MULTI_PKT_EGR | \ 168 168 HFI1_CAP_EXTENDED_PSN | \
+4 -9
drivers/staging/rdma/hfi1/qsfp.c
··· 403 403 404 404 int qsfp_mod_present(struct hfi1_pportdata *ppd) 405 405 { 406 - if (HFI1_CAP_IS_KSET(QSFP_ENABLED)) { 407 - struct hfi1_devdata *dd = ppd->dd; 408 - u64 reg; 406 + struct hfi1_devdata *dd = ppd->dd; 407 + u64 reg; 409 408 410 - reg = read_csr(dd, 411 - dd->hfi1_id ? ASIC_QSFP2_IN : ASIC_QSFP1_IN); 412 - return !(reg & QSFP_HFI0_MODPRST_N); 413 - } 414 - /* always return cable present */ 415 - return 1; 409 + reg = read_csr(dd, dd->hfi1_id ? ASIC_QSFP2_IN : ASIC_QSFP1_IN); 410 + return !(reg & QSFP_HFI0_MODPRST_N); 416 411 } 417 412 418 413 /*
+2 -2
include/uapi/rdma/hfi/hfi1_user.h
··· 88 88 #define HFI1_CAP_SDMA_AHG (1UL << 2) /* Enable SDMA AHG support */ 89 89 #define HFI1_CAP_EXTENDED_PSN (1UL << 3) /* Enable Extended PSN support */ 90 90 #define HFI1_CAP_HDRSUPP (1UL << 4) /* Enable Header Suppression */ 91 - /* 1UL << 5 reserved */ 91 + /* 1UL << 5 unused */ 92 92 #define HFI1_CAP_USE_SDMA_HEAD (1UL << 6) /* DMA Hdr Q tail vs. use CSR */ 93 93 #define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/ 94 94 #define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */ ··· 99 99 #define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */ 100 100 #define HFI1_CAP_PKEY_CHECK (1UL << 14) /* Enable ctxt PKey checking */ 101 101 #define HFI1_CAP_STATIC_RATE_CTRL (1UL << 15) /* Allow PBC.StaticRateControl */ 102 - #define HFI1_CAP_QSFP_ENABLED (1UL << 16) /* Enable QSFP check during LNI */ 102 + /* 1UL << 16 unused */ 103 103 #define HFI1_CAP_SDMA_HEAD_CHECK (1UL << 17) /* SDMA head checking */ 104 104 #define HFI1_CAP_EARLY_CREDIT_RETURN (1UL << 18) /* early credit return */ 105 105