Driver cleanup and misc fixes series 3
Subsystems (2)
v3 cover Driver cleanup and misc fixes series 3
NOTE:
This is being resubmitted to linux-rdma (for patchworks) to aid Doug Ledford in taking over the staging/rdma subtree.
https://www.mail-archive.com/linux-rdma%40vger.kernel.org/msg30860.html
This patch set is to follow: staging/rdma/hfi1: Remove unneeded variable index
Thanks,
Jubin
These patches were part of series:
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2015-December/082248.html
but did not apply cleanly to the staging-next branch.
Refreshed the remaining 2 patches against the latest staging-next.
Changes in v2:
- Added more information in commit messages of patches 01, 02 03, 04, 05, 07 and 09
- Fixed driver name to hfi1 in subject line of patch 06
- Refreshed patch 10 on top of staging-next
- Dropped patch 18 (staging/rdma/hfi1: Workaround CONFIG_SDMA_VERBOSITY timing issue) from series
Changes in v3:
- Refreshed remaining 2 patches against latest staging-next
Edward Mascarenhas (1):
staging/rdma/hfi1: Clean up comments
Ira Weiny (1):
staging/rdma/hfi1: Fix Xmit Wait calculation
drivers/staging/rdma/hfi1/chip.c | 1 - drivers/staging/rdma/hfi1/driver.c | 2 +- drivers/staging/rdma/hfi1/hfi.h | 4 ++-- drivers/staging/rdma/hfi1/mad.c | 33 ++++++++++++++++++++------------- drivers/staging/rdma/hfi1/pcie.c | 2 +- drivers/staging/rdma/hfi1/ud.c | 2 +- 6 files changed, 25 insertions(+), 19 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1452555104-6171-1-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
PATCH RESEND v3 1/2 staging/rdma/hfi1: Clean up comments
From: Edward Mascarenhas <[email protected]>
Clean up comments by deleting numbering and terms internal to Intel.
The information on the actual bugs is not deleted.
---
Changes in v2:
- Added more information in commit message
Changes in v3:
- Refreshed patch against latest staging-next
drivers/staging/rdma/hfi1/chip.c | 1 - drivers/staging/rdma/hfi1/driver.c | 2 +- drivers/staging/rdma/hfi1/hfi.h | 4 ++-- drivers/staging/rdma/hfi1/pcie.c | 2 +- drivers/staging/rdma/hfi1/ud.c | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-)
drivers/staging/rdma/hfi1/chip.c +0 -1
@@ -13537,7 +13537,6 @@ int hfi1_set_ctxt_jkey(struct hfi1_devdata *dd, unsigned ctxt, u16 jkey)write_kctxt_csr (dd, sctxt,SEND_CTXT_CHECK_JOB_KEY , reg);/* * Enable send-side J_KEY integrity check, unless this is A0 h/w -* (due to A0 erratum). */ if (!is_ax (dd)) { reg =read_kctxt_csr (dd, sctxt,SEND_CTXT_CHECK_ENABLE );
drivers/staging/rdma/hfi1/driver.c +1 -1
@@ -368,7 +368,7 @@ static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd,if (opcode ==IB_OPCODE_CNP ) {/* * Only in pre-B0 h/w is the CNP_OPCODE handled -* via this code path (errata 291394). +* via this code path. */ struct hfi1_qp *qp =NULL ;u32 lqpn, rqpn;
drivers/staging/rdma/hfi1/hfi.h +2 -2
@@ -1730,7 +1730,7 @@ static inline u64 hfi1_pkt_default_send_ctxt_mask(struct hfi1_devdata *dd, base_sc_integrity |=HFI1_PKT_KERNEL_SC_INTEGRITY ;if (is_ax (dd)) -/* turn off send-side job key checks - A0 erratum */ +/* turn off send-side job key checks - A0 */ return base_sc_integrity & ~SEND_CTXT_CHECK_ENABLE_CHECK_JOB_KEY_SMASK ;return base_sc_integrity;
@@ -1757,7 +1757,7 @@ static inline u64 hfi1_pkt_base_sdma_integrity(struct hfi1_devdata *dd) | SEND_DMA_CHECK_ENABLE_CHECK_ENABLE_SMASK;if (is_ax (dd)) -/* turn off send-side job key checks - A0 erratum */ +/* turn off send-side job key checks - A0 */ return base_sdma_integrity & ~SEND_DMA_CHECK_ENABLE_CHECK_JOB_KEY_SMASK ;return base_sdma_integrity;
drivers/staging/rdma/hfi1/pcie.c +1 -1
@@ -986,7 +986,7 @@ retry:* PcieCfgRegPl100 - Gen3 Control * * turn off PcieCfgRegPl100.Gen3ZRxDcNonCompl -* turn on PcieCfgRegPl100.EqEieosCnt (erratum) +* turn on PcieCfgRegPl100.EqEieosCnt * Everything else zero. */ reg32 =PCIE_CFG_REG_PL100_EQ_EIEOS_CNT_SMASK ;
drivers/staging/rdma/hfi1/ud.c +1 -1
@@ -671,7 +671,7 @@ void hfi1_ud_rcv(struct hfi1_packet *packet)if (unlikely (bth1 &HFI1_BECN_SMASK )) {/* * In pre-B0 h/w the CNP_OPCODE is handled via an -* error path (errata 291394). +* error path. */ struct hfi1_pportdata *ppd =ppd_from_ibp (ibp);u32 lqpn =be32_to_cpu (ohdr->bth[1 ]) &HFI1_QPN_MASK ;
Signature · 6 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH RESEND v3 2/2 staging/rdma/hfi1: Fix Xmit Wait calculation
In reply to a message not in the archiveFrom: Ira Weiny <[email protected]>
Total XMIT wait needs to sum the xmit wait values of all the VLs not just those requested in the query. Also, make the algorithm used for both PortStatus and PortDataCounters the same.
---
Changes in v2:
- No changes
Changes in v3:
- Refreshed patches against latest staging-next
drivers/staging/rdma/hfi1/mad.c | 33 ++++++++++++++++++++------------- 1 files changed, 20 insertions(+), 13 deletions(-)
drivers/staging/rdma/hfi1/mad.c +20 -13
@@ -2279,17 +2279,23 @@ static void a0_portstatus(struct hfi1_pportdata *ppd, {if (!is_bx (ppd->dd)) {unsigned long vl; -u64 max_vl_xmit_wait =0 , tmp; +u64 sum_vl_xmit_wait =0 ;u32 vl_all_mask =VL_MASK_ALL ;for_each_set_bit (vl, (unsigned long *)&(vl_all_mask),8 *sizeof (vl_all_mask)) { - tmp =read_port_cntr (ppd,C_TX_WAIT_VL , -idx_from_vl (vl)); -if (tmp > max_vl_xmit_wait) - max_vl_xmit_wait = tmp; +u64 tmp = sum_vl_xmit_wait + +read_port_cntr (ppd,C_TX_WAIT_VL , +idx_from_vl (vl)); +if (tmp < sum_vl_xmit_wait) { +/* we wrapped */ + sum_vl_xmit_wait = (u64 )~0 ; +break ; + } + sum_vl_xmit_wait = tmp; } - rsp->port_xmit_wait =cpu_to_be64 (max_vl_xmit_wait); +if (be64_to_cpu (rsp->port_xmit_wait) > sum_vl_xmit_wait) + rsp->port_xmit_wait =cpu_to_be64 (sum_vl_xmit_wait); } }
@@ -2491,18 +2497,19 @@ static u64 get_error_counter_summary(struct ib_device *ibdev, u8 port,return error_counter_summary; } -static void a0_datacounters (struct hfi1_devdata *dd,struct _port_dctrs *rsp, +static void a0_datacounters (struct hfi1_pportdata *ppd,struct _port_dctrs *rsp,u32 vl_select_mask) { -if (!is_bx (dd)) { +if (!is_bx (ppd->dd)) {unsigned long vl; -int vfi =0 ;u64 sum_vl_xmit_wait =0 ; +u32 vl_all_mask =VL_MASK_ALL ; -for_each_set_bit (vl, (unsigned long *)&(vl_select_mask), -8 *sizeof (vl_select_mask)) { +for_each_set_bit (vl, (unsigned long *)&(vl_all_mask), +8 *sizeof (vl_all_mask)) {u64 tmp = sum_vl_xmit_wait + -be64_to_cpu (rsp->vls[vfi++].port_vl_xmit_wait); +read_port_cntr (ppd,C_TX_WAIT_VL , +idx_from_vl (vl));if (tmp < sum_vl_xmit_wait) {/* we wrapped */ sum_vl_xmit_wait = (u64 ) ~0 ;
@@ -2665,7 +2672,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp, vfi++; } -a0_datacounters (dd, rsp, vl_select_mask); +a0_datacounters (ppd, rsp, vl_select_mask);if (resp_len) *resp_len += response_data_size;
Signature · 6 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html