History

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.

Easwar Hariharan committed 11 years ago

Commit 3c2f85b1 parent 25d97dd4 files · +7 −15Browse files

Unified · Split

4 files
  1. drivers/staging/rdma/hfi1/chip.c +1 −2
  2. drivers/staging/rdma/hfi1/common.h +0 −2
  3. drivers/staging/rdma/hfi1/qsfp.c +4 −9
  4. include/uapi/rdma/hfi/hfi1_user.h +2 −2
drivers/staging/rdma/hfi1/chip.c+1−2
@@ -5714,8 +5714,7 @@ void init_qsfp(struct hfi1_pportdata *ppd) · 5713 unmodified lines
57145714 u64 qsfp_mask;
57155715
57165716 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) {
57195718 ppd->driver_link_ready = 1;
57205719 return;
57215720 }
drivers/staging/rdma/hfi1/common.h+0−2
@@ -147,7 +147,6 @@ · 146 unmodified lines
147147 HFI1_CAP_USE_SDMA_HEAD | \
148148 HFI1_CAP_EXTENDED_PSN | \
149149 HFI1_CAP_PRINT_UNIMPL | \
150− HFI1_CAP_QSFP_ENABLED | \
151150 HFI1_CAP_NO_INTEGRITY | \
152151 HFI1_CAP_PKEY_CHECK) << \
153152 HFI1_CAP_USER_SHIFT)
@@ -163,7 +162,6 @@ · 9 unmodified lines
163162 HFI1_CAP_SDMA | \
164163 HFI1_CAP_PRINT_UNIMPL | \
165164 HFI1_CAP_STATIC_RATE_CTRL | \
166− HFI1_CAP_QSFP_ENABLED | \
167165 HFI1_CAP_PKEY_CHECK | \
168166 HFI1_CAP_MULTI_PKT_EGR | \
169167 HFI1_CAP_EXTENDED_PSN | \
drivers/staging/rdma/hfi1/qsfp.c+4−9
@@ -403,16 +403,11 @@ static const char *pwr_codes = "1.5W2.0W2.5W3.5W"; · 402 unmodified lines
403403
404404 int qsfp_mod_present(struct hfi1_pportdata *ppd)
405405 {
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;
409408
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);
416411 }
417412
418413 /*
include/uapi/rdma/hfi/hfi1_user.h+2−2
@@ -88,7 +88,7 @@ · 87 unmodified lines
8888 #define HFI1_CAP_SDMA_AHG (1UL << 2) /* Enable SDMA AHG support */
8989 #define HFI1_CAP_EXTENDED_PSN (1UL << 3) /* Enable Extended PSN support */
9090 #define HFI1_CAP_HDRSUPP (1UL << 4) /* Enable Header Suppression */
91−/* 1UL << 5 reserved */
91+/* 1UL << 5 unused */
9292 #define HFI1_CAP_USE_SDMA_HEAD (1UL << 6) /* DMA Hdr Q tail vs. use CSR */
9393 #define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/
9494 #define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */
@@ -99,7 +99,7 @@ · 4 unmodified lines
9999 #define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */
100100 #define HFI1_CAP_PKEY_CHECK (1UL << 14) /* Enable ctxt PKey checking */
101101 #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 */
103103 #define HFI1_CAP_SDMA_HEAD_CHECK (1UL << 17) /* SDMA head checking */
104104 #define HFI1_CAP_EARLY_CREDIT_RETURN (1UL << 18) /* early credit return */
105105