staging/rdma/hfi1: finish checkpatch fixes
Subsystems (2)
cover staging/rdma/hfi1: finish checkpatch fixes
This series adds the remaining checkpatch fixes for the hfi1 driver. This was done with strict. Any remaining checkpatch issues are intentionally left and should not be changed. A lot of the checkpatch issues were cleaned up as the code moved to rdmavt, this is the remainder.
Applies on the "Adaptive PIO performance improvement" series and can be seen in context at https://github.com/ddalessa/kernel/tree/for-4.6.
---
Jubin John (21):
staging/rdma/hfi1: Add spaces around binary operators staging/rdma/hfi1: Remove multiple blank lines staging/rdma/hfi1: Remove space after cast staging/rdma/hfi1: Fix comparison to NULL staging/rdma/hfi1: Remove blank line after an open brace staging/rdma/hfi1: Remove blank line before close brace staging/rdma/hfi1: Fix logical continuations staging/rdma/hfi1: Add blank link after declarations staging/rdma/hfi1: Remove unnecessary parentheses staging/rdma/hfi1: Use BIT_ULL macro staging/rdma/hfi1: Split multiple assignments staging/rdma/hfi1: Fix misspellings staging/rdma/hfi1: Remove CamelCase staging/rdma/hfi1: Use pointer instead of struct name staging/rdma/hfi1: Remove void function return statement staging/rdma/hfi1: Add comment for spinlock_t definition staging/rdma/hfi1: Fix block comments staging/rdma/hfi1: Fix code alignment staging/rdma/hfi1: Add braces on all arms of statement staging/rdma/hfi1: Remove else after break staging/rdma/hfi1: Fix header
drivers/staging/rdma/hfi1/affinity.c | 5 drivers/staging/rdma/hfi1/affinity.h | 5 drivers/staging/rdma/hfi1/aspm.h | 5 drivers/staging/rdma/hfi1/chip.c | 1200 +++++++++++++------------- drivers/staging/rdma/hfi1/chip.h | 35 - drivers/staging/rdma/hfi1/chip_registers.h | 5 drivers/staging/rdma/hfi1/common.h | 5 drivers/staging/rdma/hfi1/debugfs.c | 47 - drivers/staging/rdma/hfi1/debugfs.h | 5 drivers/staging/rdma/hfi1/device.c | 5 drivers/staging/rdma/hfi1/device.h | 5 drivers/staging/rdma/hfi1/diag.c | 5 drivers/staging/rdma/hfi1/dma.c | 17 drivers/staging/rdma/hfi1/driver.c | 75 +- drivers/staging/rdma/hfi1/efivar.c | 5 drivers/staging/rdma/hfi1/efivar.h | 5 drivers/staging/rdma/hfi1/eprom.c | 56 + drivers/staging/rdma/hfi1/eprom.h | 5 drivers/staging/rdma/hfi1/file_ops.c | 42 - drivers/staging/rdma/hfi1/firmware.c | 177 ++-- drivers/staging/rdma/hfi1/hfi.h | 28 - drivers/staging/rdma/hfi1/init.c | 49 + drivers/staging/rdma/hfi1/intr.c | 24 - drivers/staging/rdma/hfi1/iowait.h | 5 drivers/staging/rdma/hfi1/mad.c | 342 ++++--- drivers/staging/rdma/hfi1/mad.h | 14 drivers/staging/rdma/hfi1/opa_compat.h | 5 drivers/staging/rdma/hfi1/pcie.c | 120 +-- drivers/staging/rdma/hfi1/pio.c | 99 +- drivers/staging/rdma/hfi1/pio.h | 12 drivers/staging/rdma/hfi1/pio_copy.c | 67 + drivers/staging/rdma/hfi1/platform.c | 5 drivers/staging/rdma/hfi1/platform.h | 13 drivers/staging/rdma/hfi1/qp.c | 15 drivers/staging/rdma/hfi1/qp.h | 5 drivers/staging/rdma/hfi1/qsfp.c | 17 drivers/staging/rdma/hfi1/qsfp.h | 8 drivers/staging/rdma/hfi1/rc.c | 52 + drivers/staging/rdma/hfi1/ruc.c | 27 - drivers/staging/rdma/hfi1/sdma.c | 219 ++--- drivers/staging/rdma/hfi1/sdma.h | 23 drivers/staging/rdma/hfi1/sysfs.c | 52 - drivers/staging/rdma/hfi1/trace.c | 52 + drivers/staging/rdma/hfi1/trace.h | 1289 +++++++++++++--------------- drivers/staging/rdma/hfi1/twsi.c | 11 drivers/staging/rdma/hfi1/twsi.h | 6 drivers/staging/rdma/hfi1/uc.c | 40 - drivers/staging/rdma/hfi1/ud.c | 38 - drivers/staging/rdma/hfi1/user_exp_rcv.c | 5 drivers/staging/rdma/hfi1/user_exp_rcv.h | 5 drivers/staging/rdma/hfi1/user_pages.c | 5 drivers/staging/rdma/hfi1/user_sdma.c | 61 + drivers/staging/rdma/hfi1/user_sdma.h | 5 drivers/staging/rdma/hfi1/verbs.c | 27 - drivers/staging/rdma/hfi1/verbs.h | 9 55 files changed, 2131 insertions(+), 2332 deletions(-)
Signature · 5 lines
-Denny -- 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): 20160215041616.351.42119.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org
PATCH 1/21 staging/rdma/hfi1: Add spaces around binary operators
From: Jubin John <[email protected]>
Add spaces around binary operators.
Fixes checkpatch check:
CHECK: spaces preferred around that 'x'
where x is a binary operator
--- drivers/staging/rdma/hfi1/chip.c | 104 +++++++++++++++++---------------- drivers/staging/rdma/hfi1/debugfs.c | 2 - drivers/staging/rdma/hfi1/driver.c | 2 - drivers/staging/rdma/hfi1/eprom.c | 10 ++- drivers/staging/rdma/hfi1/firmware.c | 28 ++++----- drivers/staging/rdma/hfi1/hfi.h | 2 - drivers/staging/rdma/hfi1/intr.c | 2 - drivers/staging/rdma/hfi1/mad.c | 22 +++---- drivers/staging/rdma/hfi1/mad.h | 2 - drivers/staging/rdma/hfi1/pcie.c | 2 - drivers/staging/rdma/hfi1/pio.c | 4 + drivers/staging/rdma/hfi1/pio_copy.c | 18 +++--- drivers/staging/rdma/hfi1/qsfp.c | 6 +- drivers/staging/rdma/hfi1/qsfp.h | 2 - drivers/staging/rdma/hfi1/rc.c | 2 - drivers/staging/rdma/hfi1/sdma.c | 16 +++-- drivers/staging/rdma/hfi1/sdma.h | 2 - drivers/staging/rdma/hfi1/user_sdma.c | 2 - drivers/staging/rdma/hfi1/verbs.c | 2 - 19 files changed, 115 insertions(+), 115 deletions(-)
drivers/staging/rdma/hfi1/chip.c +52 -52
@@ -422,10 +422,10 @@ static struct flag_table pio_err_status_flags[] = { SEC_SPC_FREEZE, SEND_PIO_ERR_STATUS_PIO_STATE_MACHINE_ERR_SMASK),/*23*/ FLAG_ENTRY ("PioWriteQwValidParity" , -SEC_WRITE_DROPPED |SEC_SPC_FREEZE , +SEC_WRITE_DROPPED |SEC_SPC_FREEZE ,SEND_PIO_ERR_STATUS_PIO_WRITE_QW_VALID_PARITY_ERR_SMASK ),/*24*/ FLAG_ENTRY ("PioBlockQwCountParity" , -SEC_WRITE_DROPPED |SEC_SPC_FREEZE , +SEC_WRITE_DROPPED |SEC_SPC_FREEZE ,SEND_PIO_ERR_STATUS_PIO_BLOCK_QW_COUNT_PARITY_ERR_SMASK ), /*25*/ FLAG_ENTRY("PioVlfVlLenParity", SEC_SPC_FREEZE,
@@ -1196,7 +1196,7 @@ CNTR_ELEM(#name, \#define OVR_LBL (ctx) C_RCV_HDR_OVF_ ## ctx#define OVR_ELM (ctx) \ CNTR_ELEM("RcvHdrOvr" #ctx, \ - (RCV_HDR_OVFL_CNT + ctx*0x100), \ + (RCV_HDR_OVFL_CNT + ctx * 0x100), \ 0, CNTR_NORMAL, port_access_u64_csr)/* 32bit TXE */
@@ -5259,7 +5259,7 @@ static char *is_various_name(char *buf, size_t bsize, unsigned int source)if (source <ARRAY_SIZE (various_names))strncpy (buf, various_names[source], bsize);else -snprintf (buf, bsize,"Reserved%u" , source+IS_VARIOUS_START ); +snprintf (buf, bsize,"Reserved%u" , source +IS_VARIOUS_START );return buf; }
@@ -6318,7 +6318,7 @@ void reset_link_credits(struct hfi1_devdata *dd)/* remove all previous VL credit limits */ for (i =0 ; i <TXE_NUM_DATA_VL ; i++) -write_csr (dd,SEND_CM_CREDIT_VL + (8 *i),0 ); +write_csr (dd,SEND_CM_CREDIT_VL + (8 * i),0 );write_csr (dd,SEND_CM_CREDIT_VL15 ,0 );write_global_credit (dd,0 ,0 ,0 );/* reset the CM block */
@@ -7573,7 +7573,7 @@ static void handle_8051_interrupt(struct hfi1_devdata *dd, u32 unused, u64 reg)/* if the link is already going down or disabled, do not * queue another */ if ((ppd->host_link_state - & (HLS_GOING_OFFLINE |HLS_LINK_COOLDOWN )) + & (HLS_GOING_OFFLINE |HLS_LINK_COOLDOWN )) || ppd->link_enabled ==0 ) {dd_dev_info (dd,"%s: not queuing link down\n" , __func__);
@@ -7991,7 +7991,7 @@ static irqreturn_t general_interrupt(int irq, void *data)/* phase 2: call the appropriate handler */ for_each_set_bit (bit, (unsigned long *)®s[0 ], -CCE_NUM_INT_CSRS *64 ) { +CCE_NUM_INT_CSRS *64 ) {is_interrupt (dd, bit); }
@@ -8014,12 +8014,12 @@ static irqreturn_t sdma_interrupt(int irq, void *data)/* This read_csr is really bad in the hot path */ status =read_csr (dd, -CCE_INT_STATUS + (8 *(IS_SDMA_START /64 ))) +CCE_INT_STATUS + (8 * (IS_SDMA_START /64 ))) & sde->imask;if (likely (status)) {/* clear the interrupt(s) */ write_csr (dd, -CCE_INT_CLEAR + (8 *(IS_SDMA_START /64 )), +CCE_INT_CLEAR + (8 * (IS_SDMA_START /64 )), status);/* handle the interrupt(s) */
@@ -8944,10 +8944,10 @@ static u16 opa_to_vc_link_widths(u16 opa_widths)u16 from;u16 to; } opa_link_xlate[] = { - { OPA_LINK_WIDTH_1X, 1 << (1-1) }, - { OPA_LINK_WIDTH_2X, 1 << (2-1) }, - { OPA_LINK_WIDTH_3X, 1 << (3-1) }, - { OPA_LINK_WIDTH_4X, 1 << (4-1) }, + { OPA_LINK_WIDTH_1X, 1 << (1 - 1) }, + { OPA_LINK_WIDTH_2X, 1 << (2 - 1) }, + { OPA_LINK_WIDTH_3X, 1 << (3 - 1) }, + { OPA_LINK_WIDTH_4X, 1 << (4 - 1) }, }; for (i = 0; i < ARRAY_SIZE(opa_link_xlate); i++) {
@@ -9725,7 +9725,7 @@ static void set_lidlmc(struct hfi1_pportdata *ppd) c1 &= ~(DCC_CFG_PORT_CONFIG1_TARGET_DLID_SMASK |DCC_CFG_PORT_CONFIG1_DLID_MASK_SMASK ); c1 |= ((ppd->lid &DCC_CFG_PORT_CONFIG1_TARGET_DLID_MASK ) - <<DCC_CFG_PORT_CONFIG1_TARGET_DLID_SHIFT )| + <<DCC_CFG_PORT_CONFIG1_TARGET_DLID_SHIFT ) | ((mask &DCC_CFG_PORT_CONFIG1_DLID_MASK_MASK ) <<DCC_CFG_PORT_CONFIG1_DLID_MASK_SHIFT );write_csr (ppd->dd,DCC_CFG_PORT_CONFIG1 , c1);
@@ -10290,7 +10290,7 @@ int hfi1_set_ib_cfg(struct hfi1_pportdata *ppd, int which, u32 val)* The VL Arbitrator high limit is sent in units of 4k * bytes, while HFI stores it in units of 64 bytes. */ - val *=4096 /64 ; + val *=4096 /64 ; reg = ((u64 )val &SEND_HIGH_PRIORITY_LIMIT_LIMIT_MASK ) <<SEND_HIGH_PRIORITY_LIMIT_LIMIT_SHIFT ;write_csr (ppd->dd,SEND_HIGH_PRIORITY_LIMIT , reg);
@@ -10507,7 +10507,7 @@ static int get_buffer_control(struct hfi1_devdata *dd,/* OPA and HFI have a 1-1 mapping */ for (i =0 ; i <TXE_NUM_DATA_VL ; i++) -read_one_cm_vl (dd,SEND_CM_CREDIT_VL + (8 *i), &bc->vl[i]); +read_one_cm_vl (dd,SEND_CM_CREDIT_VL + (8 * i), &bc->vl[i]);/* NOTE: assumes that VL* and VL15 CSRs are bit-wise identical */ read_one_cm_vl (dd,SEND_CM_CREDIT_VL15 , &bc->vl[15 ]);
@@ -11207,16 +11207,16 @@ u32 hdrqempty(struct hfi1_ctxtdata *rcd)static u32 encoded_size (u32 size) {switch (size) { -case 4 *1024 :return 0x1 ; -case 8 *1024 :return 0x2 ; -case 16 *1024 :return 0x3 ; -case 32 *1024 :return 0x4 ; -case 64 *1024 :return 0x5 ; -case 128 *1024 :return 0x6 ; -case 256 *1024 :return 0x7 ; -case 512 *1024 :return 0x8 ; -case 1 *1024 *1024 :return 0x9 ; -case 2 *1024 *1024 :return 0xa ; +case 4 *1024 :return 0x1 ; +case 8 *1024 :return 0x2 ; +case 16 *1024 :return 0x3 ; +case 32 *1024 :return 0x4 ; +case 64 *1024 :return 0x5 ; +case 128 *1024 :return 0x6 ; +case 256 *1024 :return 0x7 ; +case 512 *1024 :return 0x8 ; +case 1 *1024 *1024 :return 0x9 ; +case 2 *1024 *1024 :return 0xa ; }return 0x1 ;/* if invalid, go with the minimum size */ }
@@ -12324,12 +12324,12 @@ void set_intr_state(struct hfi1_devdata *dd, u32 enable)if (enable) {/* enable all interrupts */ for (i =0 ; i <CCE_NUM_INT_CSRS ; i++) -write_csr (dd,CCE_INT_MASK + (8 *i), ~(u64 )0 ); +write_csr (dd,CCE_INT_MASK + (8 * i), ~(u64 )0 );init_qsfp_int (dd); }else {for (i =0 ; i <CCE_NUM_INT_CSRS ; i++) -write_csr (dd,CCE_INT_MASK + (8 *i),0ull ); +write_csr (dd,CCE_INT_MASK + (8 * i),0ull ); } }
@@ -12341,7 +12341,7 @@ static void clear_all_interrupts(struct hfi1_devdata *dd)int i;for (i =0 ; i <CCE_NUM_INT_CSRS ; i++) -write_csr (dd,CCE_INT_CLEAR + (8 *i), ~(u64 )0 ); +write_csr (dd,CCE_INT_CLEAR + (8 * i), ~(u64 )0 );write_csr (dd,CCE_ERR_CLEAR , ~(u64 )0 );write_csr (dd,MISC_ERR_CLEAR , ~(u64 )0 );
@@ -12421,10 +12421,10 @@ static void remap_intr(struct hfi1_devdata *dd, int isrc, int msix_intr)/* direct the chip source to the given MSI-X interrupt */ m = isrc /8 ; n = isrc %8 ; - reg =read_csr (dd,CCE_INT_MAP + (8 *m)); - reg &= ~((u64 )0xff << (8 *n)); - reg |= ((u64 )msix_intr &0xff ) << (8 *n); -write_csr (dd,CCE_INT_MAP + (8 *m), reg); + reg =read_csr (dd,CCE_INT_MAP + (8 * m)); + reg &= ~((u64 )0xff << (8 * n)); + reg |= ((u64 )msix_intr &0xff ) << (8 * n); +write_csr (dd,CCE_INT_MAP + (8 * m), reg); } static void remap_sdma_interrupts(struct hfi1_devdata *dd,
@@ -12437,11 +12437,11 @@ static void remap_sdma_interrupts(struct hfi1_devdata *dd,* SDMAProgress * SDMAIdle */ -remap_intr (dd,IS_SDMA_START +0 *TXE_NUM_SDMA_ENGINES + engine, +remap_intr (dd,IS_SDMA_START +0 *TXE_NUM_SDMA_ENGINES + engine, msix_intr); -remap_intr (dd,IS_SDMA_START +1 *TXE_NUM_SDMA_ENGINES + engine, +remap_intr (dd,IS_SDMA_START +1 *TXE_NUM_SDMA_ENGINES + engine, msix_intr); -remap_intr (dd,IS_SDMA_START +2 *TXE_NUM_SDMA_ENGINES + engine, +remap_intr (dd,IS_SDMA_START +2 *TXE_NUM_SDMA_ENGINES + engine, msix_intr); }
@@ -12520,9 +12520,9 @@ static int request_msix_irqs(struct hfi1_devdata *dd)* Set the interrupt register and mask for this * context's interrupt. */ - rcd->ireg = (IS_RCVAVAIL_START +idx) /64 ; + rcd->ireg = (IS_RCVAVAIL_START + idx) /64 ; rcd->imask = ((u64 )1 ) << - ((IS_RCVAVAIL_START +idx) %64 ); + ((IS_RCVAVAIL_START + idx) %64 ); handler = receive_context_interrupt; thread = receive_context_thread; arg = rcd;
@@ -12542,7 +12542,7 @@ static int request_msix_irqs(struct hfi1_devdata *dd)if (arg ==NULL )continue ;/* make sure the name is terminated */ - me->name[sizeof (me->name)-1 ] =0 ; + me->name[sizeof (me->name) -1 ] =0 ; ret =request_threaded_irq (me->msix.vector, handler, thread,0 , me->name, arg);
@@ -12581,7 +12581,7 @@ static void reset_interrupts(struct hfi1_devdata *dd)/* all chip interrupts map to MSI-X 0 */ for (i =0 ; i <CCE_NUM_INT_MAP_CSRS ; i++) -write_csr (dd,CCE_INT_MAP + (8 *i),0 ); +write_csr (dd,CCE_INT_MAP + (8 * i),0 ); }static int set_up_interrupts (struct hfi1_devdata *dd)
@@ -12831,7 +12831,7 @@ static void write_uninitialized_csrs_and_memories(struct hfi1_devdata *dd)/* CceIntMap */ for (i =0 ; i <CCE_NUM_INT_MAP_CSRS ; i++) -write_csr (dd,CCE_INT_MAP +(8 *i),0 ); +write_csr (dd,CCE_INT_MAP + (8 * i),0 );/* SendCtxtCreditReturnAddr */ for (i =0 ; i < dd->chip_send_contexts; i++)
@@ -12849,12 +12849,12 @@ static void write_uninitialized_csrs_and_memories(struct hfi1_devdata *dd)write_kctxt_csr (dd, i,RCV_HDR_ADDR ,0 );write_kctxt_csr (dd, i,RCV_HDR_TAIL_ADDR ,0 );for (j =0 ; j <RXE_NUM_TID_FLOWS ; j++) -write_uctxt_csr (dd, i,RCV_TID_FLOW_TABLE +(8 *j),0 ); +write_uctxt_csr (dd, i,RCV_TID_FLOW_TABLE + (8 * j),0 ); }/* RcvArray */ for (i =0 ; i < dd->chip_rcv_array_count; i++) -write_csr (dd,RCV_ARRAY + (8 *i), +write_csr (dd,RCV_ARRAY + (8 * i),RCV_ARRAY_RT_WRITE_ENABLE_SMASK );/* RcvQPMapTable */
@@ -13092,15 +13092,15 @@ static void reset_txe_csrs(struct hfi1_devdata *dd)write_csr (dd,SEND_ERR_CLEAR , ~0ull );/* SEND_ERR_FORCE read-only */ for (i =0 ; i <VL_ARB_LOW_PRIO_TABLE_SIZE ; i++) -write_csr (dd,SEND_LOW_PRIORITY_LIST + (8 *i),0 ); +write_csr (dd,SEND_LOW_PRIORITY_LIST + (8 * i),0 );for (i =0 ; i <VL_ARB_HIGH_PRIO_TABLE_SIZE ; i++) -write_csr (dd,SEND_HIGH_PRIORITY_LIST + (8 *i),0 ); -for (i =0 ; i < dd->chip_send_contexts/NUM_CONTEXTS_PER_SET ; i++) -write_csr (dd,SEND_CONTEXT_SET_CTRL + (8 *i),0 ); +write_csr (dd,SEND_HIGH_PRIORITY_LIST + (8 * i),0 ); +for (i =0 ; i < dd->chip_send_contexts /NUM_CONTEXTS_PER_SET ; i++) +write_csr (dd,SEND_CONTEXT_SET_CTRL + (8 * i),0 );for (i =0 ; i <TXE_NUM_32_BIT_COUNTER ; i++) -write_csr (dd,SEND_COUNTER_ARRAY32 + (8 *i),0 ); +write_csr (dd,SEND_COUNTER_ARRAY32 + (8 * i),0 );for (i =0 ; i <TXE_NUM_64_BIT_COUNTER ; i++) -write_csr (dd,SEND_COUNTER_ARRAY64 + (8 *i),0 ); +write_csr (dd,SEND_COUNTER_ARRAY64 + (8 * i),0 );write_csr (dd,SEND_CM_CTRL ,SEND_CM_CTRL_RESETCSR );write_csr (dd,SEND_CM_GLOBAL_CREDIT ,SEND_CM_GLOBAL_CREDIT_RESETCSR );
@@ -13111,7 +13111,7 @@ static void reset_txe_csrs(struct hfi1_devdata *dd)write_csr (dd,SEND_CM_REMOTE_AU_TABLE0_TO3 ,0 );write_csr (dd,SEND_CM_REMOTE_AU_TABLE4_TO7 ,0 );for (i =0 ; i <TXE_NUM_DATA_VL ; i++) -write_csr (dd,SEND_CM_CREDIT_VL + (8 *i),0 ); +write_csr (dd,SEND_CM_CREDIT_VL + (8 * i),0 );write_csr (dd,SEND_CM_CREDIT_VL15 ,0 );/* SEND_CM_CREDIT_USED_VL read-only */ /* SEND_CM_CREDIT_USED_VL15 read-only */
@@ -13403,7 +13403,7 @@ static void init_chip(struct hfi1_devdata *dd)write_csr (dd,RCV_CTXT_CTRL ,0 );/* mask all interrupt sources */ for (i =0 ; i <CCE_NUM_INT_CSRS ; i++) -write_csr (dd,CCE_INT_MASK + (8 *i),0ull ); +write_csr (dd,CCE_INT_MASK + (8 * i),0ull );/* * DC Reset: do a full DC reset before the register clear.
@@ -14404,7 +14404,7 @@ static void handle_temp_err(struct hfi1_devdata *dd)dd_dev_emerg (dd,"Critical temperature reached! Forcing device into freeze mode!\n" ); dd->flags |=HFI1_FORCED_FREEZE ; -start_freeze_handling (ppd,FREEZE_SELF |FREEZE_ABORT ); +start_freeze_handling (ppd,FREEZE_SELF |FREEZE_ABORT );/* * Shut DC down as much and as quickly as possible. *
drivers/staging/rdma/hfi1/debugfs.c +1 -1
@@ -750,7 +750,7 @@ void hfi1_dbg_ibdev_init(struct hfi1_ibdev *ibd) ppd, &port_cntr_ops[i].ops, port_cntr_ops[i].ops.write ==NULL ? - S_IRUGO : S_IRUGO|S_IWUSR); + S_IRUGO : S_IRUGO | S_IWUSR); } }
drivers/staging/rdma/hfi1/driver.c +1 -1
@@ -702,7 +702,7 @@ static inline int process_rcv_packet(struct hfi1_packet *packet, int thread)*/ prefetch_range (packet->ebuf, packet->tlen - ((packet->rcd->rcvhdrqentsize - - (rhf_hdrq_offset (packet->rhf)+2 )) *4 )); + (rhf_hdrq_offset (packet->rhf) +2 )) *4 )); }/*
drivers/staging/rdma/hfi1/eprom.c +5 -5
@@ -99,7 +99,7 @@/* sleep length while waiting for controller */ #define WAIT_SLEEP_US 100/* must be larger than 5 (see usage) */ -#define COUNT_DELAY_SEC (n) ((n) * (1000000/WAIT_SLEEP_US)) +#define COUNT_DELAY_SEC (n) ((n) * (1000000 / WAIT_SLEEP_US))/* GPIO pins */ #define EPROM_WP_N (1ull << 14)/* EPROM write line */
@@ -254,7 +254,7 @@ static void read_page(struct hfi1_devdata *dd, u32 offset, u32 *result)int i;write_csr (dd,ASIC_EEP_ADDR_CMD ,CMD_READ_DATA (offset)); -for (i =0 ; i <EP_PAGE_SIZE /sizeof (u32); i++) +for (i =0 ; i <EP_PAGE_SIZE /sizeof (u32); i++) result[i] = (u32 )read_csr (dd,ASIC_EEP_DATA );write_csr (dd,ASIC_EEP_ADDR_CMD ,CMD_NOP );/* close open page */ }
@@ -265,7 +265,7 @@ static void read_page(struct hfi1_devdata *dd, u32 offset, u32 *result)static int read_length (struct hfi1_devdata *dd,u32 start,u32 len,u64 addr) {u32 offset; -u32 buffer[EP_PAGE_SIZE /sizeof (u32)]; +u32 buffer[EP_PAGE_SIZE /sizeof (u32)];int ret =0 ;/* reject anything not on an EPROM page boundary */
@@ -296,7 +296,7 @@ static int write_page(struct hfi1_devdata *dd, u32 offset, u32 *data)write_csr (dd,ASIC_EEP_ADDR_CMD ,CMD_WRITE_ENABLE );write_csr (dd,ASIC_EEP_DATA , data[0 ]);write_csr (dd,ASIC_EEP_ADDR_CMD ,CMD_PAGE_PROGRAM (offset)); -for (i =1 ; i <EP_PAGE_SIZE /sizeof (u32); i++) +for (i =1 ; i <EP_PAGE_SIZE /sizeof (u32); i++)write_csr (dd,ASIC_EEP_DATA , data[i]);/* will close the open page */ return wait_for_not_busy (dd);
@@ -308,7 +308,7 @@ static int write_page(struct hfi1_devdata *dd, u32 offset, u32 *data)static int write_length (struct hfi1_devdata *dd,u32 start,u32 len,u64 addr) {u32 offset; -u32 buffer[EP_PAGE_SIZE /sizeof (u32)]; +u32 buffer[EP_PAGE_SIZE /sizeof (u32)];int ret =0 ;/* reject anything not on an EPROM page boundary */
drivers/staging/rdma/hfi1/firmware.c +14 -14
@@ -393,17 +393,17 @@ static int verify_css_header(struct hfi1_devdata *dd, struct css_header *css)/* verify CSS header fields (most sizes are in DW, so add /4) */ if (invalid_header (dd,"module_type" , css->module_type,CSS_MODULE_TYPE ) ||invalid_header (dd,"header_len" , css->header_len, - (sizeof (struct firmware_file )/4 )) + (sizeof (struct firmware_file ) /4 )) ||invalid_header (dd,"header_version" , css->header_version,CSS_HEADER_VERSION ) ||invalid_header (dd,"module_vendor" , css->module_vendor,CSS_MODULE_VENDOR ) ||invalid_header (dd,"key_size" , - css->key_size,KEY_SIZE /4 ) + css->key_size,KEY_SIZE /4 ) ||invalid_header (dd,"modulus_size" , - css->modulus_size,KEY_SIZE /4 ) + css->modulus_size,KEY_SIZE /4 ) ||invalid_header (dd,"exponent_size" , - css->exponent_size,EXPONENT_SIZE /4 )) { + css->exponent_size,EXPONENT_SIZE /4 )) {return -EINVAL ; }return 0 ;
@@ -488,7 +488,7 @@ static int obtain_one_firmware(struct hfi1_devdata *dd, const char *name, ret =verify_css_header (dd, css);if (ret) {dd_dev_info (dd,"Invalid CSS header for \"%s\"\n" , name); - }else if ((css->size*4 ) == fdet->fw->size) { + }else if ((css->size *4 ) == fdet->fw->size) {/* non-augmented firmware file */ struct firmware_file *ff = (struct firmware_file *) fdet->fw->data;
@@ -513,7 +513,7 @@ static int obtain_one_firmware(struct hfi1_devdata *dd, const char *name,dd_dev_err (dd,"driver is unable to validate firmware without r2 and mu (not in firmware file)\n" ); ret = -EINVAL ; } - }else if ((css->size*4 ) +AUGMENT_SIZE == fdet->fw->size) { + }else if ((css->size *4 ) +AUGMENT_SIZE == fdet->fw->size) {/* augmented firmware file */ struct augmented_firmware_file *aff = (struct augmented_firmware_file *)fdet->fw->data;
@@ -536,7 +536,7 @@ static int obtain_one_firmware(struct hfi1_devdata *dd, const char *name,/* css->size check failed */ dd_dev_err (dd,"invalid firmware header field size: expected 0x%lx or 0x%lx, actual 0x%x\n" , - fdet->fw->size/4 , (fdet->fw->size -AUGMENT_SIZE )/4 , + fdet->fw->size /4 , (fdet->fw->size -AUGMENT_SIZE ) /4 , css->size); ret = -EINVAL ;
@@ -780,7 +780,7 @@ static int retry_firmware(struct hfi1_devdata *dd, int load_result)static void write_rsa_data (struct hfi1_devdata *dd,int what,const u8 *data,int nbytes) { -int qw_size = nbytes/8 ; +int qw_size = nbytes /8 ;int i;if (((unsigned long )data &0x7 ) ==0 ) {
@@ -788,14 +788,14 @@ static void write_rsa_data(struct hfi1_devdata *dd, int what,u64 *ptr = (u64 *)data;for (i =0 ; i < qw_size; i++, ptr++) -write_csr (dd, what + (8 *i), *ptr); +write_csr (dd, what + (8 * i), *ptr); }else {/* not aligned */ for (i =0 ; i < qw_size; i++, data +=8 ) {u64 value;memcpy (&value, data,8 ); -write_csr (dd, what + (8 *i), value); +write_csr (dd, what + (8 * i), value); } } }
@@ -808,7 +808,7 @@ static void write_streamed_rsa_data(struct hfi1_devdata *dd, int what, const u8 *data, int nbytes) {u64 *ptr = (u64 *)data; -int qw_size = nbytes/8 ; +int qw_size = nbytes /8 ;for (; qw_size >0 ; qw_size--, ptr++)write_csr (dd, what, *ptr);
@@ -1743,8 +1743,8 @@ int get_platform_config_field(struct hfi1_devdata *dd,if (len < field_len_bits)return -EINVAL ; - seek = field_start_bits/8 ; - wlen = field_len_bits/8 ; + seek = field_start_bits /8 ; + wlen = field_len_bits /8 ; src_ptr = (u32 *)((u8 *)src_ptr + seek);
@@ -1783,7 +1783,7 @@ int get_platform_config_field(struct hfi1_devdata *dd,if (!src_ptr || len < field_len_bits)return -EINVAL ; - src_ptr += (field_start_bits/32 ); + src_ptr += (field_start_bits /32 ); *data = (*src_ptr >> (field_start_bits %32 )) & ((1 << field_len_bits) -1 );
drivers/staging/rdma/hfi1/hfi.h +1 -1
@@ -718,7 +718,7 @@ struct hfi1_pportdata {/* begin congestion log related entries * cc_log_lock protects all congestion log related data */ spinlock_t cc_log_lock____cacheline_aligned_in_smp ; -u8 threshold_cong_event_map[OPA_MAX_SLS /8 ]; +u8 threshold_cong_event_map[OPA_MAX_SLS /8 ];u16 threshold_event_counter;struct opa_hfi1_cong_log_event_internal cc_events[OPA_CONG_LOG_ELEMS ];int cc_log_idx;/* index for logging events */
drivers/staging/rdma/hfi1/intr.c +1 -1
@@ -166,7 +166,7 @@ void handle_linkup_change(struct hfi1_devdata *dd, u32 linkup)reset_link_credits (dd);/* freeze after a link down to guarantee a clean egress */ -start_freeze_handling (ppd,FREEZE_SELF |FREEZE_LINK_DOWN ); +start_freeze_handling (ppd,FREEZE_SELF |FREEZE_LINK_DOWN ); ev =IB_EVENT_PORT_ERR ;
drivers/staging/rdma/hfi1/mad.c +11 -11
@@ -534,7 +534,7 @@ static int __subn_get_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data, ppd = dd->pport + (port -1 ); ibp = &ppd->ibport_data; -if (ppd->vls_supported/2 >ARRAY_SIZE (pi->neigh_mtu.pvlx_to_mtu) || +if (ppd->vls_supported /2 >ARRAY_SIZE (pi->neigh_mtu.pvlx_to_mtu) || ppd->vls_supported >ARRAY_SIZE (dd->vld)) { smp->status |=IB_SMP_INVALID_FIELD ;return reply ((struct ib_mad_hdr *)smp);
@@ -600,13 +600,13 @@ static int __subn_get_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data,for (i =0 ; i < ppd->vls_supported; i++) { mtu =mtu_to_enum (dd->vld[i].mtu,HFI1_DEFAULT_ACTIVE_MTU );if ((i %2 ) ==0 ) - pi->neigh_mtu.pvlx_to_mtu[i/2 ] |= (mtu <<4 ); + pi->neigh_mtu.pvlx_to_mtu[i /2 ] |= (mtu <<4 );else - pi->neigh_mtu.pvlx_to_mtu[i/2 ] |= mtu; + pi->neigh_mtu.pvlx_to_mtu[i /2 ] |= mtu; }/* don't forget VL 15 */ mtu =mtu_to_enum (dd->vld[15 ].mtu,2048 ); - pi->neigh_mtu.pvlx_to_mtu[15 /2 ] |= mtu; + pi->neigh_mtu.pvlx_to_mtu[15 /2 ] |= mtu; pi->smsl = ibp->rvp.sm_sl &OPA_PI_MASK_SMSL ; pi->operational_vls =hfi1_get_ib_cfg (ppd,HFI1_IB_CFG_OP_VLS ); pi->partenforce_filterraw |=
@@ -744,7 +744,7 @@ static int __subn_get_opa_pkeytable(struct opa_smp *smp, u32 am, u8 *data,return reply ((struct ib_mad_hdr *)smp); } - n_blocks_avail = (u16) (npkeys/OPA_PARTITION_TABLE_BLK_SIZE ) +1 ; + n_blocks_avail = (u16) (npkeys /OPA_PARTITION_TABLE_BLK_SIZE ) +1 ; size = (n_blocks_req *OPA_PARTITION_TABLE_BLK_SIZE ) *sizeof (u16);
@@ -1207,17 +1207,17 @@ static int __subn_set_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data, (void )hfi1_set_ib_cfg (ppd,HFI1_IB_CFG_VL_HIGH_LIMIT , ibp->rvp.vl_high_limit); -if (ppd->vls_supported/2 >ARRAY_SIZE (pi->neigh_mtu.pvlx_to_mtu) || +if (ppd->vls_supported /2 >ARRAY_SIZE (pi->neigh_mtu.pvlx_to_mtu) || ppd->vls_supported >ARRAY_SIZE (dd->vld)) { smp->status |=IB_SMP_INVALID_FIELD ;return reply ((struct ib_mad_hdr *)smp); }for (i =0 ; i < ppd->vls_supported; i++) {if ((i %2 ) ==0 ) - mtu =enum_to_mtu ((pi->neigh_mtu.pvlx_to_mtu[i/2 ] >>4 ) + mtu =enum_to_mtu ((pi->neigh_mtu.pvlx_to_mtu[i /2 ] >>4 ) &0xF );else - mtu =enum_to_mtu (pi->neigh_mtu.pvlx_to_mtu[i/2 ] &0xF ); + mtu =enum_to_mtu (pi->neigh_mtu.pvlx_to_mtu[i /2 ] &0xF );if (mtu ==0xffff ) { pr_warn("SubnSet(OPA_PortInfo) mtu invalid %d (0x%x)\n", mtu,
@@ -1236,7 +1236,7 @@ static int __subn_set_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data,/* As per OPAV1 spec: VL15 must support and be configured * for operation with a 2048 or larger MTU. */ - mtu =enum_to_mtu (pi->neigh_mtu.pvlx_to_mtu[15 /2 ] &0xF ); + mtu =enum_to_mtu (pi->neigh_mtu.pvlx_to_mtu[15 /2 ] &0xF );if (mtu <2048 || mtu ==0xffff ) mtu =2048 ;if (dd->vld[15 ].mtu != mtu) {
@@ -1419,7 +1419,7 @@ static int __subn_set_opa_pkeytable(struct opa_smp *smp, u32 am, u8 *data,return reply ((struct ib_mad_hdr *)smp); } - n_blocks_avail = (u16)(npkeys/OPA_PARTITION_TABLE_BLK_SIZE ) +1 ; + n_blocks_avail = (u16)(npkeys /OPA_PARTITION_TABLE_BLK_SIZE ) +1 ;if (start_block + n_blocks_sent > n_blocks_avail || n_blocks_sent >OPA_NUM_PKEY_BLOCKS_PER_SMP ) {
@@ -3460,7 +3460,7 @@ static int __subn_get_opa_cc_table(struct opa_smp *smp, u32 am, u8 *data,rcu_read_unlock ();if (resp_len) - *resp_len +=sizeof (u16)*(IB_CCT_ENTRIES * n_blocks +1 ); + *resp_len +=sizeof (u16) * (IB_CCT_ENTRIES * n_blocks +1 );return reply ((struct ib_mad_hdr *)smp); }
drivers/staging/rdma/hfi1/mad.h +1 -1
@@ -267,7 +267,7 @@ struct opa_hfi1_cong_log {u8 congestion_flags;__be16 threshold_event_counter;__be32 current_time_stamp; -u8 threshold_cong_event_map[OPA_MAX_SLS /8 ]; +u8 threshold_cong_event_map[OPA_MAX_SLS /8 ];struct opa_hfi1_cong_log_event events[OPA_CONG_LOG_ELEMS ]; } __packed;
drivers/staging/rdma/hfi1/pcie.c +1 -1
@@ -840,7 +840,7 @@ static void write_gasket_interrupt(struct hfi1_devdata *dd, int index, {write_csr (dd,ASIC_PCIE_SD_INTRPT_LIST + (index *8 ), (((u64 )code <<ASIC_PCIE_SD_INTRPT_LIST_INTRPT_CODE_SHIFT ) - |((u64 )data <<ASIC_PCIE_SD_INTRPT_LIST_INTRPT_DATA_SHIFT ))); + | ((u64 )data <<ASIC_PCIE_SD_INTRPT_LIST_INTRPT_DATA_SHIFT ))); }/*
drivers/staging/rdma/hfi1/pio.c +2 -2
@@ -101,7 +101,7 @@ void pio_send_control(struct hfi1_devdata *dd, int op)/* Fall through */ case PSC_DATA_VL_ENABLE :/* Disallow sending on VLs not enabled */ - mask = (((~0ull )<<num_vls) &SEND_CTRL_UNSUPPORTED_VL_MASK )<< + mask = (((~0ull ) << num_vls) &SEND_CTRL_UNSUPPORTED_VL_MASK ) <<SEND_CTRL_UNSUPPORTED_VL_SHIFT ; reg = (reg & ~SEND_CTRL_UNSUPPORTED_VL_SMASK ) | mask;break ;
@@ -1346,7 +1346,7 @@ void sc_stop(struct send_context *sc, int flag)wake_up (&sc->halt_wait); } -#define BLOCK_DWORDS (PIO_BLOCK_SIZE/sizeof(u32)) +#define BLOCK_DWORDS (PIO_BLOCK_SIZE / sizeof(u32))#define dwords_to_blocks (x) DIV_ROUND_UP(x, BLOCK_DWORDS)/*
drivers/staging/rdma/hfi1/pio_copy.c +9 -9
@@ -52,9 +52,9 @@/* additive distance between non-SOP and SOP space */ #define SOP_DISTANCE (TXE_PIO_SIZE / 2) -#define PIO_BLOCK_MASK (PIO_BLOCK_SIZE-1) +#define PIO_BLOCK_MASK (PIO_BLOCK_SIZE - 1)/* number of QUADWORDs in a block */ -#define PIO_BLOCK_QWS (PIO_BLOCK_SIZE/sizeof(u64)) +#define PIO_BLOCK_QWS (PIO_BLOCK_SIZE / sizeof(u64))/** * pio_copy - copy data block to MMIO space
@@ -83,7 +83,7 @@ void pio_copy(struct hfi1_devdata *dd, struct pio_buf *pbuf, u64 pbc, dest +=sizeof (u64);/* calculate where the QWORD data ends - in SOP=1 space */ - dend = dest + ((count>>1 ) *sizeof (u64)); + dend = dest + ((count >>1 ) *sizeof (u64));if (dend < send) {/* all QWORD data is within the SOP block, does *not*
@@ -177,7 +177,7 @@ void pio_copy(struct hfi1_devdata *dd, struct pio_buf *pbuf, u64 pbc,* "zero" shift - bit shift used to zero out upper bytes. Input is * the count of LSB bytes to preserve. */ -#define zshift (x) (8 * (8-(x))) +#define zshift (x) (8 * (8 - (x)))/* * "merge" shift - bit shift used to merge with carry bytes. Input is
@@ -244,7 +244,7 @@ static inline void read_extra_bytes(struct pio_buf *pbuf, pbuf->carry.val64 |= (((*(u64 *)from) >>mshift (off)) <<zshift (xbytes)) - >>zshift (xbytes+pbuf->carry_bytes); + >>zshift (xbytes + pbuf->carry_bytes); off =0 ; pbuf->carry_bytes += xbytes; nbytes -= xbytes;
@@ -411,7 +411,7 @@ static inline void merge_write8(jcopy (&pbuf->carry.val8[pbuf->carry_bytes], src, remainder);writeq (pbuf->carry.val64, dest); -jcopy (&pbuf->carry.val8[0 ], src+remainder, pbuf->carry_bytes); +jcopy (&pbuf->carry.val8[0 ], src + remainder, pbuf->carry_bytes); }/*
@@ -463,7 +463,7 @@ void seg_pio_copy_start(struct pio_buf *pbuf, u64 pbc, dest +=sizeof (u64);/* calculate where the QWORD data ends - in SOP=1 space */ - dend = dest + ((nbytes>>3 ) *sizeof (u64)); + dend = dest + ((nbytes >>3 ) *sizeof (u64));if (dend < send) {/* all QWORD data is within the SOP block, does *not*
@@ -645,7 +645,7 @@ static void mid_copy_straight(struct pio_buf *pbuf,void __iomem *dend;/* 8-byte data end */ /* calculate 8-byte data end */ - dend = dest + ((nbytes>>3 ) *sizeof (u64)); + dend = dest + ((nbytes >>3 ) *sizeof (u64));if (pbuf->qw_written <PIO_BLOCK_QWS ) {/*
@@ -713,7 +713,7 @@ static void mid_copy_straight(struct pio_buf *pbuf,/* we know carry_bytes was zero on entry to this routine */ read_low_bytes (pbuf, from, nbytes &0x7 ); - pbuf->qw_written += nbytes>>3 ; + pbuf->qw_written += nbytes >>3 ; }/*
drivers/staging/rdma/hfi1/qsfp.c +3 -3
@@ -339,7 +339,7 @@ int refresh_qsfp_cache(struct hfi1_pportdata *ppd, struct qsfp_data *cp)u8 *cache = &cp->cache[0 ];/* ensure sane contents on invalid reads, for cable swaps */ -memset (cache,0 , (QSFP_MAX_NUM_PAGES *128 )); +memset (cache,0 , (QSFP_MAX_NUM_PAGES *128 ));spin_lock_irqsave (&ppd->qsfp_info.qsfp_lock, flags); ppd->qsfp_info.cache_valid =0 ;spin_unlock_irqrestore (&ppd->qsfp_info.qsfp_lock, flags);
@@ -420,7 +420,7 @@ int refresh_qsfp_cache(struct hfi1_pportdata *ppd, struct qsfp_data *cp)return 0 ; bail: -memset (cache,0 , (QSFP_MAX_NUM_PAGES *128 )); +memset (cache,0 , (QSFP_MAX_NUM_PAGES *128 ));return ret; }
@@ -564,7 +564,7 @@ int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len)memcpy (bin_buff, &cache[bidx],QSFP_DUMP_CHUNK );for (iidx =0 ; iidx <QSFP_DUMP_CHUNK ; ++iidx) { - sofar +=scnprintf (buf + sofar, len-sofar, + sofar +=scnprintf (buf + sofar, len - sofar," %02X" , bin_buff[iidx]); } sofar +=scnprintf (buf + sofar, len - sofar,"\n" );
drivers/staging/rdma/hfi1/qsfp.h +1 -1
@@ -214,7 +214,7 @@ struct qsfp_data {/* Helps to find our way */ struct hfi1_pportdata *ppd;struct work_struct qsfp_work; -u8 cache[QSFP_MAX_NUM_PAGES *128 ]; +u8 cache[QSFP_MAX_NUM_PAGES *128 ];spinlock_t qsfp_lock;u8 check_interrupt_flags;u8 reset_needed;
drivers/staging/rdma/hfi1/rc.c +1 -1
@@ -1992,7 +1992,7 @@ static void log_cca_event(struct hfi1_pportdata *ppd, u8 sl, u32 rlid,spin_lock_irqsave (&ppd->cc_log_lock, flags); - ppd->threshold_cong_event_map[sl/8 ] |=1 << (sl %8 ); + ppd->threshold_cong_event_map[sl /8 ] |=1 << (sl %8 ); ppd->threshold_event_counter++; cc_event = &ppd->cc_events[ppd->cc_log_idx++];
drivers/staging/rdma/hfi1/sdma.c +8 -8
@@ -1020,7 +1020,7 @@ int sdma_init(struct hfi1_devdata *dd, u8 port) dd->chip_sdma_mem_size); per_sdma_credits = - dd->chip_sdma_mem_size/(num_engines *SDMA_BLOCK_SIZE ); + dd->chip_sdma_mem_size / (num_engines *SDMA_BLOCK_SIZE );/* set up freeze waitqueue */ init_waitqueue_head (&dd->sdma_unfreeze_wq);
@@ -1051,12 +1051,12 @@ int sdma_init(struct hfi1_devdata *dd, u8 port) sde->sdma_mask = (1 << sde->sdma_shift) -1 ;/* Create a mask for all 3 chip interrupt sources */ - sde->imask = (u64 )1 << (0 *TXE_NUM_SDMA_ENGINES + this_idx) - | (u64 )1 << (1 *TXE_NUM_SDMA_ENGINES + this_idx) - | (u64 )1 << (2 *TXE_NUM_SDMA_ENGINES + this_idx); + sde->imask = (u64 )1 << (0 *TXE_NUM_SDMA_ENGINES + this_idx) + | (u64 )1 << (1 *TXE_NUM_SDMA_ENGINES + this_idx) + | (u64 )1 << (2 *TXE_NUM_SDMA_ENGINES + this_idx);/* Create a mask specifically for sdma_idle */ sde->idle_mask = - (u64 )1 << (2 *TXE_NUM_SDMA_ENGINES + this_idx); + (u64 )1 << (2 *TXE_NUM_SDMA_ENGINES + this_idx);/* Create a mask specifically for sdma_progress */ sde->progress_mask = (u64 )1 << (TXE_NUM_SDMA_ENGINES + this_idx);
@@ -1626,10 +1626,10 @@ static void sdma_setlengen(struct sdma_engine *sde)* generation counter. */ write_sde_csr (sde,SD (LEN_GEN ), - (sde->descq_cnt/64 ) <<SD (LEN_GEN_LENGTH_SHIFT ) + (sde->descq_cnt /64 ) <<SD (LEN_GEN_LENGTH_SHIFT ) );write_sde_csr (sde,SD (LEN_GEN ), - ((sde->descq_cnt/64 ) <<SD (LEN_GEN_LENGTH_SHIFT )) + ((sde->descq_cnt /64 ) <<SD (LEN_GEN_LENGTH_SHIFT )) | (4ULL <<SD (LEN_GEN_GENERATION_SHIFT )) ); }
@@ -3058,5 +3058,5 @@ void _sdma_engine_progress_schedule(trace_hfi1_sdma_engine_progress (sde, sde->progress_mask);/* assume we have selected a good cpu */ write_csr (sde->dd, -CCE_INT_FORCE + (8 *(IS_SDMA_START /64 )), sde->progress_mask); +CCE_INT_FORCE + (8 * (IS_SDMA_START /64 )), sde->progress_mask); }
drivers/staging/rdma/hfi1/sdma.h +1 -1
@@ -682,7 +682,7 @@ static inline void _sdma_close_tx(struct hfi1_devdata *dd, dd->default_desc1;if (tx->flags &SDMA_TXREQ_F_URGENT ) tx->descp[tx->num_desc].qw[1 ] |= - (SDMA_DESC1_HEAD_TO_HOST_FLAG | + (SDMA_DESC1_HEAD_TO_HOST_FLAG |SDMA_DESC1_INT_REQ_FLAG ); }
drivers/staging/rdma/hfi1/user_sdma.c +1 -1
@@ -1204,7 +1204,7 @@ static int set_txreq_header(struct user_sdma_request *req,/* Set ACK request on last packet */ if (unlikely (tx->flags &TXREQ_FLAGS_REQ_LAST_PKT )) - hdr->bth[2 ] |=cpu_to_be32 (1UL <<31 ); + hdr->bth[2 ] |=cpu_to_be32 (1UL <<31 );/* Set the new offset */ hdr->kdeth.swdata[6 ] =cpu_to_le32 (req->koffset);
drivers/staging/rdma/hfi1/verbs.c +1 -1
@@ -874,7 +874,7 @@ int hfi1_verbs_send_pio(struct rvt_qp *qp, struct hfi1_pkt_state *ps,pio_copy (ppd->dd, pbuf, pbc, hdr, hdrwords); }else {if (ss) { -seg_pio_copy_start (pbuf, pbc, hdr, hdrwords*4 ); +seg_pio_copy_start (pbuf, pbc, hdr, hdrwords *4 );while (len) {void *addr = ss->sge.vaddr;u32 slen = ss->sge.length;
--
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 2/21 staging/rdma/hfi1: Remove multiple blank lines
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Remove multiple blank lines to fix checkpatch check:
CHECK: Please don't use multiple blank lines
--- drivers/staging/rdma/hfi1/chip.c | 6 ------ drivers/staging/rdma/hfi1/debugfs.c | 3 --- drivers/staging/rdma/hfi1/file_ops.c | 2 -- drivers/staging/rdma/hfi1/hfi.h | 2 -- drivers/staging/rdma/hfi1/init.c | 1 - drivers/staging/rdma/hfi1/intr.c | 1 - drivers/staging/rdma/hfi1/mad.c | 1 - drivers/staging/rdma/hfi1/mad.h | 1 - drivers/staging/rdma/hfi1/pcie.c | 1 - drivers/staging/rdma/hfi1/pio.c | 1 - drivers/staging/rdma/hfi1/pio.h | 2 -- drivers/staging/rdma/hfi1/sdma.c | 2 -- drivers/staging/rdma/hfi1/sdma.h | 4 ---- drivers/staging/rdma/hfi1/sysfs.c | 6 ------ drivers/staging/rdma/hfi1/trace.h | 4 ---- drivers/staging/rdma/hfi1/twsi.h | 1 - drivers/staging/rdma/hfi1/ud.c | 1 - drivers/staging/rdma/hfi1/verbs.c | 2 -- 18 files changed, 0 insertions(+), 41 deletions(-)
drivers/staging/rdma/hfi1/chip.c +0 -6
@@ -986,7 +986,6 @@ static struct flag_table dc8051_info_host_msg_flags[] = { FLAG_ENTRY0("Link going down", 0x0100), }; -static u32 encoded_size (u32 size);static u32 chip_to_opa_lstate (struct hfi1_devdata *dd,u32 chip_lstate);static int set_physical_link_state (struct hfi1_devdata *dd,u64 state);
@@ -1285,7 +1284,6 @@ static inline u64 read_write_csr(const struct hfi1_devdata *dd, u32 csr, {u64 ret; -if (mode ==CNTR_MODE_R ) { ret =read_csr (dd, csr); }else if (mode ==CNTR_MODE_W ) {
@@ -10748,7 +10746,6 @@ int set_buffer_control(struct hfi1_pportdata *ppd,#define valid_vl (idx) ((idx) < TXE_NUM_DATA_VL || (idx) == 15)#define NUM_USABLE_VLS 16/* look at VL15 and less */ -/* find the new total credits, do sanity check on unused VLs */ for (i =0 ; i <OPA_MAX_VLS ; i++) {if (valid_vl (i)) {
@@ -11891,7 +11888,6 @@ static int init_cntrs(struct hfi1_devdata *dd)if (!dd->scntrs) goto bail; -/* allocate space for the counter names */ dd->cntrnameslen = sz; dd->cntrnames =kmalloc (sz,GFP_KERNEL );
@@ -12060,7 +12056,6 @@ bail:return -ENOMEM ; } -static u32 chip_to_opa_lstate (struct hfi1_devdata *dd,u32 chip_lstate) {switch (chip_lstate) {
@@ -14282,7 +14277,6 @@ static u16 delay_cycles(struct hfi1_pportdata *ppd, u32 desired_egress_rate,return (u16 )delta_cycles; } -/** * create_pbc - build a pbc for transmission * @flags: special case flags or-ed in built pbc
drivers/staging/rdma/hfi1/debugfs.c +0 -3
@@ -102,7 +102,6 @@ do { \pr_warn ("create of %s failed\n" , name); \ } while (0) -#define DEBUGFS_SEQ_FILE_CREATE (name, parent, data) \ DEBUGFS_FILE_CREATE(#name, parent, data, &_##name##_file_ops, S_IRUGO)
@@ -127,7 +126,6 @@ static void *_opcode_stats_seq_next(struct seq_file *s, void *v, loff_t *pos)return pos; } -static void _opcode_stats_seq_stop (struct seq_file *s,void *v)__releases (RCU ) {
@@ -308,7 +306,6 @@ static void *_sdes_seq_next(struct seq_file *s, void *v, loff_t *pos)return pos; } -static void _sdes_seq_stop (struct seq_file *s,void *v)__releases (RCU ) {
drivers/staging/rdma/hfi1/file_ops.c +0 -2
@@ -162,7 +162,6 @@ enum mmap_types {#define dbg (fmt, ...) \ pr_info(fmt, ##__VA_ARGS__) -static inline int is_valid_mmap (u64 token) {return (HFI1_MMAP_TOKEN_GET (MAGIC , token) ==HFI1_MMAP_MAGIC );
@@ -1589,7 +1588,6 @@ static loff_t ui_lseek(struct file *filp, loff_t offset, int whence)return filp->f_pos; } -/* NOTE: assumes unsigned long is 8 bytes */ static ssize_t ui_read (struct file *filp,char __user *buf,size_t count,loff_t *f_pos)
drivers/staging/rdma/hfi1/hfi.h +0 -2
@@ -878,7 +878,6 @@ struct hfi1_devdata {wait_queue_head_t sdma_unfreeze_wq;atomic_t sdma_unfreeze_count; -/* hfi1_pportdata, points to array of (physical) port-specific * data structs, indexed by pidx (0..n-1) */
@@ -1598,7 +1597,6 @@ static inline struct cc_state *get_cc_state(struct hfi1_pportdata *ppd)/* IB dword length mask in PBC (lower 11 bits); same for all chips */ #define HFI1_PBC_LENGTH_MASK ((1 << 11) - 1) -/* ctxt_flag bit offsets */ /* context has been setup */ #define HFI1_CTXT_SETUP_DONE 1
drivers/staging/rdma/hfi1/init.c +0 -1
@@ -1723,7 +1723,6 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd) rcd->ctxt, rcd->egrbufs.alloced, rcd->egrbufs.rcvtid_size, rcd->egrbufs.size); -/* * Set the contexts rcv array head update threshold to the closest * power of 2 (so we can use a mask instead of modulo) below half
drivers/staging/rdma/hfi1/intr.c +0 -1
@@ -179,7 +179,6 @@ void handle_linkup_change(struct hfi1_devdata *dd, u32 linkup)signal_ib_event (ppd, ev); } - }/*
drivers/staging/rdma/hfi1/mad.c +0 -1
@@ -2310,7 +2310,6 @@ static void a0_portstatus(struct hfi1_pportdata *ppd, } } -static int pma_get_opa_portstatus (struct opa_pma_mad *pmp,struct ib_device *ibdev,u8 port,u32 *resp_len) {
drivers/staging/rdma/hfi1/mad.h +0 -1
@@ -235,7 +235,6 @@ struct ib_pma_portcounters_cong {#define IB_CC_SVCTYPE_RD 0x2#define IB_CC_SVCTYPE_UD 0x3 -/* * There should be an equivalent IB #define for the following, but * I cannot find it.
drivers/staging/rdma/hfi1/pcie.c +0 -1
@@ -447,7 +447,6 @@ void restore_pci_variables(struct hfi1_devdata *dd)pci_write_config_dword (dd->pcidev,PCIE_CFG_TPH2 , dd->pci_tph2); } -/* * BIOS may not set PCIe bus-utilization parameters for best performance. * Check and optionally adjust them to maximize our throughput.
drivers/staging/rdma/hfi1/pio.c +0 -1
@@ -852,7 +852,6 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type, sc->credit_ctrl, thresh); -return sc; }
drivers/staging/rdma/hfi1/pio.h +0 -2
@@ -50,7 +50,6 @@* */ -/* send context types */ #define SC_KERNEL 0#define SC_ACK 1
@@ -318,7 +317,6 @@ void pio_kernel_unfreeze(struct hfi1_devdata *dd);void __cm_reset (struct hfi1_devdata *dd,u64 sendctrl);void pio_send_control (struct hfi1_devdata *dd,int op); -/* PIO copy routines */ void pio_copy (struct hfi1_devdata *dd,struct pio_buf *pbuf,u64 pbc,const void *from,size_t count);
drivers/staging/rdma/hfi1/sdma.c +0 -2
@@ -609,7 +609,6 @@ static void sdma_sw_clean_up_task(unsigned long opaque)* descq are ours to play with. */ -/* * In the error clean up sequence, software clean must be called * before the hardware clean so we can use the hardware head in
@@ -1691,7 +1690,6 @@ static void set_sdma_integrity(struct sdma_engine *sde)write_sde_csr (sde,SD (CHECK_ENABLE ), reg); } - static void init_sdma_regs( struct sdma_engine *sde, u32 credits,
drivers/staging/rdma/hfi1/sdma.h +0 -4
@@ -65,7 +65,6 @@/* Hardware limit for SDMA packet size */ #define MAX_SDMA_PKT_SIZE ((16 * 1024) - 1) -#define SDMA_TXREQ_S_OK 0#define SDMA_TXREQ_S_SENDERROR 1#define SDMA_TXREQ_S_ABORTED 2
@@ -418,7 +417,6 @@ struct sdma_engine {struct list_head flushlist; }; -int sdma_init (struct hfi1_devdata *dd,u8 port);void sdma_start (struct hfi1_devdata *dd);void sdma_exit (struct hfi1_devdata *dd);
@@ -464,7 +462,6 @@ static inline int __sdma_running(struct sdma_engine *engine)return engine->state.current_state == sdma_state_s99_running; } -/** * sdma_running() - state suitability test * @engine: sdma engine
@@ -494,7 +491,6 @@ void _sdma_txreq_ahgadd(u32 *ahg, u8 ahg_hlen); -/** * sdma_txinit_ahg() - initialize an sdma_txreq struct with AHG * @tx: tx request to initialize
drivers/staging/rdma/hfi1/sysfs.c +0 -6
@@ -53,7 +53,6 @@#include "mad.h" #include "trace.h" -/* * Start of per-port congestion control structures and support code */
@@ -254,7 +253,6 @@ HFI1_SC2VL_ATTR(29);HFI1_SC2VL_ATTR (30 );HFI1_SC2VL_ATTR (31 ); -static struct attribute *sc2vl_default_attributes[] = { &hfi1_sc2vl_attr_0.attr, &hfi1_sc2vl_attr_1.attr,
@@ -360,7 +358,6 @@ HFI1_SL2SC_ATTR(29);HFI1_SL2SC_ATTR (30 );HFI1_SL2SC_ATTR (31 ); -static struct attribute *sl2sc_default_attributes[] = { &hfi1_sl2sc_attr_0.attr, &hfi1_sl2sc_attr_1.attr,
@@ -493,7 +490,6 @@ static struct kobj_type hfi1_vl2mtu_ktype = { .default_attrs = vl2mtu_default_attributes }; -/* end of per-port file structures and support code */ /*
@@ -535,7 +531,6 @@ static ssize_t show_boardversion(struct device *device,return scnprintf (buf,PAGE_SIZE ,"%s" , dd->boardversion); } -static ssize_t show_nctxts (struct device *device,struct device_attribute *attr,char *buf) {
@@ -702,7 +697,6 @@ int hfi1_create_port_files(struct ib_device *ibdev, u8 port_num, }kobject_uevent (&ppd->vl2mtu_kobj,KOBJ_ADD ); - ret =kobject_init_and_add (&ppd->pport_cc_kobj, &port_cc_ktype, kobj,"CCMgtA" );if (ret) {
drivers/staging/rdma/hfi1/trace.h +0 -4
@@ -380,7 +380,6 @@ const char *parse_sdma_flags(#define __parse_sdma_flags (desc0, desc1) parse_sdma_flags(p, desc0, desc1) -#define lrh_name (lrh) { HFI1_##lrh, #lrh }#define show_lnh (lrh) \ __print_symbolic(lrh, \
@@ -427,7 +426,6 @@ __print_symbolic(opcode, \ ib_opcode_name(UD_SEND_ONLY_WITH_IMMEDIATE), \ ib_opcode_name(CNP)) -#define LRH_PRN "vl %d lver %d sl %d lnh %d,%s dlid %.4x len %d slid %.4x"#define BTH_PRN \ "op 0x%.2x,%s se %d m %d pad %d tver %d pkey 0x%.4x " \
@@ -563,7 +561,6 @@ DEFINE_EVENT(hfi1_ibhdr_template, output_ibhdr,#undef TRACE_SYSTEM#define TRACE_SYSTEM hfi1_snoop - TRACE_EVENT(snoop_capture, TP_PROTO(struct hfi1_devdata *dd, int hdr_len,
@@ -760,7 +757,6 @@ DECLARE_EVENT_CLASS(hfi1_bct_template, ) ); -DEFINE_EVENT (hfi1_bct_template, bct_set, TP_PROTO(struct hfi1_devdata *dd, struct buffer_control *bc),TP_ARGS (dd, bc));
drivers/staging/rdma/hfi1/twsi.h +0 -1
@@ -65,5 +65,4 @@ int hfi1_twsi_blk_rd(struct hfi1_devdata *dd, u32 target, int dev, int addr,int hfi1_twsi_blk_wr (struct hfi1_devdata *dd,u32 target,int dev,int addr,const void *buffer,int len); -#endif /* _TWSI_H */
drivers/staging/rdma/hfi1/ud.c +0 -1
@@ -647,7 +647,6 @@ static int opa_smp_check(struct hfi1_ibport *ibp, u16 pkey, u8 sc5,return 0 ; } -/** * hfi1_ud_rcv - receive an incoming UD packet * @ibp: the port the packet came in on
drivers/staging/rdma/hfi1/verbs.c +0 -2
@@ -376,7 +376,6 @@ dropit:return 0 ; } -/** * hfi1_ib_rcv - process an incoming packet * @packet: data packet information
@@ -965,7 +964,6 @@ static inline int egress_pkey_check(struct hfi1_pportdata *ppd,if ((sc5 ==0xf ) && ((pkey &PKEY_LOW_15_MASK ) !=PKEY_LOW_15_MASK )) goto bad; -/* Is the pkey = 0x0, or 0x8000? */ if ((pkey &PKEY_LOW_15_MASK ) ==0 ) goto bad;
--
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 3/21 staging/rdma/hfi1: Remove space after cast
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Remove the space after a cast to fix checkpatch check:
CHECK: No space is necessary after a cast
--- drivers/staging/rdma/hfi1/chip.c | 6 ++-- drivers/staging/rdma/hfi1/debugfs.c | 4 +-- drivers/staging/rdma/hfi1/dma.c | 12 ++++---- drivers/staging/rdma/hfi1/driver.c | 6 ++-- drivers/staging/rdma/hfi1/firmware.c | 2 + drivers/staging/rdma/hfi1/hfi.h | 4 +-- drivers/staging/rdma/hfi1/mad.c | 48 +++++++++++++++++---------------- drivers/staging/rdma/hfi1/pcie.c | 4 +-- drivers/staging/rdma/hfi1/pio.c | 2 + drivers/staging/rdma/hfi1/rc.c | 14 +++++----- drivers/staging/rdma/hfi1/ruc.c | 8 +++--- drivers/staging/rdma/hfi1/sdma.c | 10 +++---- drivers/staging/rdma/hfi1/trace.c | 2 + drivers/staging/rdma/hfi1/user_sdma.c | 2 + drivers/staging/rdma/hfi1/verbs.h | 4 +-- 15 files changed, 64 insertions(+), 64 deletions(-)
drivers/staging/rdma/hfi1/chip.c +3 -3
@@ -5436,7 +5436,7 @@ static void update_rcverr_timer(unsigned long opaque) OPA_LINKDOWN_REASON_EXCESSIVE_BUFFER_OVERRUN);queue_work (ppd->hfi1_wq, &ppd->link_bounce_work); } - dd->rcv_ovfl_cnt = (u32 ) cur_ovfl_cnt; + dd->rcv_ovfl_cnt = (u32 )cur_ovfl_cnt;mod_timer (&dd->rcverr_timer, jiffies +HZ *RCVERR_CHECK_TIME ); }
@@ -6366,7 +6366,7 @@ static void lcb_shutdown(struct hfi1_devdata *dd, int abort) reg | (1ull <<DCC_CFG_RESET_RESET_LCB_SHIFT ) | (1ull << DCC_CFG_RESET_RESET_RX_FPE_SHIFT)); - (void )read_csr (dd,DCC_CFG_RESET );/* make sure the write completed */ + (void )read_csr (dd,DCC_CFG_RESET );/* make sure the write completed */ if (!abort) {udelay (1 );/* must hold for the longer of 16cclks or 20ns */ write_csr (dd,DCC_CFG_RESET , reg);
@@ -13407,7 +13407,7 @@ static void init_chip(struct hfi1_devdata *dd)* across the clear. */ write_csr (dd,CCE_DC_CTRL ,CCE_DC_CTRL_DC_RESET_SMASK ); - (void )read_csr (dd,CCE_DC_CTRL ); + (void )read_csr (dd,CCE_DC_CTRL );if (use_flr) {/*
drivers/staging/rdma/hfi1/debugfs.c +2 -2
@@ -149,8 +149,8 @@ static int _opcode_stats_seq_show(struct seq_file *s, void *v)if (!n_packets && !n_bytes)return SEQ_SKIP ;seq_printf (s,"%02llx %llu/%llu\n" , i, - (unsigned long long ) n_packets, - (unsigned long long ) n_bytes); + (unsigned long long )n_packets, + (unsigned long long )n_bytes);return 0 ; }
drivers/staging/rdma/hfi1/dma.c +6 -6
@@ -52,7 +52,7 @@#include "verbs.h" -#define BAD_DMA_ADDRESS ((u64) 0) +#define BAD_DMA_ADDRESS ((u64)0)/* * The following functions implement driver specific replacements
@@ -74,7 +74,7 @@ static u64 hfi1_dma_map_single(struct ib_device *dev, void *cpu_addr,if (WARN_ON (!valid_dma_direction (direction)))return BAD_DMA_ADDRESS ; -return (u64 ) cpu_addr; +return (u64 )cpu_addr; } static void hfi1_dma_unmap_single(struct ib_device *dev, u64 addr, size_t size,
@@ -95,7 +95,7 @@ static u64 hfi1_dma_map_page(struct ib_device *dev, struct page *page,if (offset + size >PAGE_SIZE )return BAD_DMA_ADDRESS ; - addr = (u64 )page_address (page); + addr = (u64 )page_address (page);if (addr) addr += offset;
@@ -120,7 +120,7 @@ static int hfi1_map_sg(struct ib_device *dev, struct scatterlist *sgl,return BAD_DMA_ADDRESS ;for_each_sg (sgl, sg, nents, i) { - addr = (u64 )page_address (sg_page (sg)); + addr = (u64 )page_address (sg_page (sg));if (!addr) { ret =0 ;break ;
@@ -161,14 +161,14 @@ static void *hfi1_dma_alloc_coherent(struct ib_device *dev, size_t size,if (p) addr =page_address (p);if (dma_handle) - *dma_handle = (u64 ) addr; + *dma_handle = (u64 )addr;return addr; }static void hfi1_dma_free_coherent (struct ib_device *dev,size_t size,void *cpu_addr,u64 dma_handle) { -free_pages ((unsigned long ) cpu_addr,get_order (size)); +free_pages ((unsigned long )cpu_addr,get_order (size)); }struct ib_dma_mapping_ops hfi1_dma_mapping_ops = {
drivers/staging/rdma/hfi1/driver.c +3 -3
@@ -594,7 +594,7 @@ static void __prescan_rxq(struct hfi1_packet *packet)while (1 ) {struct hfi1_devdata *dd = rcd->dd;struct hfi1_ibport *ibp = &rcd->ppd->ibport_data; -__le32 *rhf_addr = (__le32 *) rcd->rcvhdrq + mdata.ps_head + +__le32 *rhf_addr = (__le32 *)rcd->rcvhdrq + mdata.ps_head + dd->rhf_offset;struct rvt_qp *qp;struct hfi1_ib_header *hdr;
@@ -730,7 +730,7 @@ static inline int process_rcv_packet(struct hfi1_packet *packet, int thread) } } - packet->rhf_addr = (__le32 *) packet->rcd->rcvhdrq + packet->rhqoff + + packet->rhf_addr = (__le32 *)packet->rcd->rcvhdrq + packet->rhqoff + packet->rcd->dd->rhf_offset; packet->rhf =rhf_to_cpu (packet->rhf_addr);
@@ -969,7 +969,7 @@ int handle_receive_interrupt(struct hfi1_ctxtdata *rcd, int thread)/* On to the next packet */ packet.rhqoff += packet.rsize; - packet.rhf_addr = (__le32 *) rcd->rcvhdrq + + packet.rhf_addr = (__le32 *)rcd->rcvhdrq + packet.rhqoff + dd->rhf_offset; packet.rhf =rhf_to_cpu (packet.rhf_addr);
drivers/staging/rdma/hfi1/firmware.c +1 -1
@@ -1838,7 +1838,7 @@ void read_guid(struct hfi1_devdata *dd) {/* Take the DC out of reset to get a valid GUID value */ write_csr (dd,CCE_DC_CTRL ,0 ); - (void )read_csr (dd,CCE_DC_CTRL ); + (void )read_csr (dd,CCE_DC_CTRL ); dd->base_guid =read_csr (dd,DC_DC8051_CFG_LOCAL_GUID ); dd_dev_info(dd, "GUID %llx",
drivers/staging/rdma/hfi1/hfi.h +2 -2
@@ -1668,7 +1668,7 @@ void hfi1_release_user_pages(struct page **, size_t, bool);static inline void clear_rcvhdrtail (const struct hfi1_ctxtdata *rcd) { - *((u64 *) rcd->rcvhdrtail_kvaddr) =0ULL ; + *((u64 *)rcd->rcvhdrtail_kvaddr) =0ULL ; }static inline u32 get_rcvhdrtail (const struct hfi1_ctxtdata *rcd)
@@ -1677,7 +1677,7 @@ static inline u32 get_rcvhdrtail(const struct hfi1_ctxtdata *rcd)* volatile because it's a DMA target from the chip, routine is * inlined, and don't want register caching or reordering. */ -return (u32 )le64_to_cpu (*rcd->rcvhdrtail_kvaddr); +return (u32 )le64_to_cpu (*rcd->rcvhdrtail_kvaddr); }/*
drivers/staging/rdma/hfi1/mad.c +24 -24
188 lines not on this page · raw message
drivers/staging/rdma/hfi1/pcie.c +2 -2
@@ -233,7 +233,7 @@ int hfi1_pcie_ddinit(struct hfi1_devdata *dd, struct pci_dev *pdev,*/ void hfi1_pcie_ddcleanup (struct hfi1_devdata *dd) { -u64 __iomem *base = (void __iomem *) dd->kregbase; +u64 __iomem *base = (void __iomem *)dd->kregbase; dd->flags &= ~HFI1_PRESENT ; dd->kregbase =NULL ;
@@ -1188,7 +1188,7 @@ retry:/* step 5h: arm gasket logic */ /* hold DC in reset across the SBR */ write_csr (dd,CCE_DC_CTRL ,CCE_DC_CTRL_DC_RESET_SMASK ); - (void )read_csr (dd,CCE_DC_CTRL );/* DC reset hold */ + (void )read_csr (dd,CCE_DC_CTRL );/* DC reset hold */ /* save firmware control across the SBR */ fw_ctrl =read_csr (dd,MISC_CFG_FW_CTRL );
drivers/staging/rdma/hfi1/pio.c +1 -1
@@ -130,7 +130,7 @@ void pio_send_control(struct hfi1_devdata *dd, int op)if (write) {write_csr (dd,SEND_CTRL , reg);if (flush) - (void )read_csr (dd,SEND_CTRL );/* flush write */ + (void )read_csr (dd,SEND_CTRL );/* flush write */ }spin_unlock_irqrestore (&dd->sendctrl_lock, flags);
drivers/staging/rdma/hfi1/rc.c +7 -7
@@ -1610,7 +1610,7 @@ static void rc_rcv_resp(struct hfi1_ibport *ibp,if (opcode ==OP (ATOMIC_ACKNOWLEDGE )) {__be32 *p = ohdr->u.at.atomic_ack_eth; - val = ((u64 )be32_to_cpu (p[0 ]) <<32 ) | + val = ((u64 )be32_to_cpu (p[0 ]) <<32 ) |be32_to_cpu (p[1 ]); }else val =0 ;
@@ -1708,7 +1708,7 @@ read_last: aeth =be32_to_cpu (ohdr->u.aeth);hfi1_copy_sge (&qp->s_rdma_read_sge, data, tlen,0 ,0 );WARN_ON (qp->s_rdma_read_sge.num_sge); - (void )do_rc_ack (qp, aeth, psn, + (void )do_rc_ack (qp, aeth, psn,OP (RDMA_READ_RESPONSE_LAST ),0 , rcd); goto ack_done; }
@@ -1906,7 +1906,7 @@ static noinline int rc_rcv_error(struct hfi1_other_headers *ohdr, void *data,* or the send tasklet is already backed up to send an * earlier entry, we can ignore this request. */ -if (!e || e->opcode != (u8 ) opcode || old_req) +if (!e || e->opcode != (u8 )opcode || old_req) goto unlock_done; qp->s_tail_ack_queue = prev;break ;
@@ -2430,7 +2430,7 @@ send_last: e->rdma_sge.mr =NULL ; } ateth = &ohdr->u.atomic_eth; - vaddr = ((u64 )be32_to_cpu (ateth->vaddr[0 ]) <<32 ) | + vaddr = ((u64 )be32_to_cpu (ateth->vaddr[0 ]) <<32 ) |be32_to_cpu (ateth->vaddr[1 ]);if (unlikely (vaddr & (sizeof (u64) -1 ))) goto nack_inv_unlck;
@@ -2441,11 +2441,11 @@ send_last: IB_ACCESS_REMOTE_ATOMIC))) goto nack_acc_unlck;/* Perform atomic OP and save result. */ - maddr = (atomic64_t *) qp->r_sge.sge.vaddr; + maddr = (atomic64_t *)qp->r_sge.sge.vaddr; sdata =be64_to_cpu (ateth->swap_data); e->atomic_data = (opcode ==OP (FETCH_ADD )) ? - (u64 )atomic64_add_return (sdata, maddr) - sdata : - (u64 )cmpxchg ((u64 *) qp->r_sge.sge.vaddr, + (u64 )atomic64_add_return (sdata, maddr) - sdata : + (u64 )cmpxchg ((u64 *)qp->r_sge.sge.vaddr,be64_to_cpu (ateth->compare_data), sdata);rvt_put_mr (qp->r_sge.sge.mr);
drivers/staging/rdma/hfi1/ruc.c +4 -4
@@ -508,12 +508,12 @@ do_write: IB_ACCESS_REMOTE_ATOMIC))) goto acc_err;/* Perform atomic OP and save result. */ - maddr = (atomic64_t *) qp->r_sge.sge.vaddr; + maddr = (atomic64_t *)qp->r_sge.sge.vaddr; sdata = wqe->atomic_wr.compare_add; - *(u64 *) sqp->s_sge.sge.vaddr = + *(u64 *)sqp->s_sge.sge.vaddr = (wqe->wr.opcode ==IB_WR_ATOMIC_FETCH_AND_ADD ) ? - (u64 )atomic64_add_return (sdata, maddr) - sdata : - (u64 )cmpxchg ((u64 *) qp->r_sge.sge.vaddr, + (u64 )atomic64_add_return (sdata, maddr) - sdata : + (u64 )cmpxchg ((u64 *)qp->r_sge.sge.vaddr, sdata, wqe->atomic_wr.swap);rvt_put_mr (qp->r_sge.sge.mr); qp->r_sge.num_sge =0 ;
drivers/staging/rdma/hfi1/sdma.c +5 -5
@@ -534,7 +534,7 @@ static void sdma_err_progress_check(unsigned long data)static void sdma_hw_clean_up_task (unsigned long opaque) { -struct sdma_engine *sde = (struct sdma_engine *) opaque; +struct sdma_engine *sde = (struct sdma_engine *)opaque;u64 statuscsr;while (1 ) {
@@ -594,7 +594,7 @@ static void sdma_flush_descq(struct sdma_engine *sde)static void sdma_sw_clean_up_task (unsigned long opaque) { -struct sdma_engine *sde = (struct sdma_engine *) opaque; +struct sdma_engine *sde = (struct sdma_engine *)opaque;unsigned long flags;spin_lock_irqsave (&sde->tail_lock, flags);
@@ -1346,8 +1346,8 @@ retry: use_dmahead =HFI1_CAP_IS_KSET (USE_SDMA_HEAD ) &&__sdma_running (sde) && (dd->flags &HFI1_HAS_SDMA_TIMEOUT ); hwhead = use_dmahead ? - (u16 )le64_to_cpu (*sde->head_dma) : - (u16 )read_sde_csr (sde,SD (HEAD )); + (u16 )le64_to_cpu (*sde->head_dma) : + (u16 )read_sde_csr (sde,SD (HEAD ));if (unlikely (HFI1_CAP_IS_KSET (SDMA_HEAD_CHECK ))) {u16 cnt;
@@ -3022,7 +3022,7 @@ void sdma_freeze(struct hfi1_devdata *dd)* software clean will read engine CSRs, so must be completed before * the next step, which will clear the engine CSRs. */ - (void )wait_event_interruptible (dd->sdma_unfreeze_wq, + (void )wait_event_interruptible (dd->sdma_unfreeze_wq,atomic_read (&dd->sdma_unfreeze_count) <=0 );/* no need to check results - done no matter what */ }
drivers/staging/rdma/hfi1/trace.c +1 -1
@@ -158,7 +158,7 @@ const char *parse_everbs_hdrs( eh->atomic_eth.rkey, (unsigned long long )ib_u64_get ( (__be32 *)&eh->atomic_eth.swap_data), - (unsigned long long )ib_u64_get ( + (unsigned long long )ib_u64_get ( (__be32 *)&eh->atomic_eth.compare_data));break ;/* deth */
drivers/staging/rdma/hfi1/user_sdma.c +1 -1
@@ -1030,7 +1030,7 @@ free_tx:*/ static inline int num_user_pages (const struct iovec *iov) { -const unsigned long addr = (unsigned long ) iov->iov_base; +const unsigned long addr = (unsigned long )iov->iov_base;const unsigned long len = iov->iov_len;const unsigned long spage = addr &PAGE_MASK ;const unsigned long epage = (addr + len -1 ) &PAGE_MASK ;
drivers/staging/rdma/hfi1/verbs.h +2 -2
@@ -346,7 +346,7 @@ int hfi1_process_mad(struct ib_device *ibdev, int mad_flags, u8 port,*/ static inline int cmp_msn (u32 a,u32 b) { -return (((int ) a) - ((int ) b)) <<8 ; +return (((int )a) - ((int )b)) <<8 ; }/*
@@ -355,7 +355,7 @@ static inline int cmp_msn(u32 a, u32 b)*/ static inline int cmp_psn (u32 a,u32 b) { -return (((int ) a) - ((int ) b)) <<PSN_SHIFT ; +return (((int )a) - ((int )b)) <<PSN_SHIFT ; }/*
--
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 4/21 staging/rdma/hfi1: Fix comparison to NULL
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Convert pointer comparisons to NULL to !pointer to fix checkpatch check:
CHECK: Comparison to NULL could be written "!pointer"
--- drivers/staging/rdma/hfi1/chip.c | 6 +++--- drivers/staging/rdma/hfi1/debugfs.c | 2 +- drivers/staging/rdma/hfi1/driver.c | 6 +++--- drivers/staging/rdma/hfi1/init.c | 4 ++-- drivers/staging/rdma/hfi1/mad.c | 8 ++++---- drivers/staging/rdma/hfi1/pio.c | 2 +- drivers/staging/rdma/hfi1/rc.c | 2 +- drivers/staging/rdma/hfi1/sysfs.c | 4 ++-- drivers/staging/rdma/hfi1/verbs.c | 4 ++-- 9 files changed, 19 insertions(+), 19 deletions(-)
drivers/staging/rdma/hfi1/chip.c +3 -3
@@ -12260,7 +12260,7 @@ u64 hfi1_gpio_mod(struct hfi1_devdata *dd, u32 target, u32 data, u32 dir,int hfi1_init_ctxt (struct send_context *sc) { -if (sc !=NULL ) { +if (sc) {struct hfi1_devdata *dd = sc->dd;u64 reg; u8 set = (sc->type == SC_USER ?
@@ -12371,7 +12371,7 @@ static void clean_up_interrupts(struct hfi1_devdata *dd)struct hfi1_msix_entry *me = dd->msix_entries;for (i =0 ; i < dd->num_msix_entries; i++, me++) { -if (me->arg ==NULL )/* => no irq, no affinity */ +if (!me->arg)/* => no irq, no affinity */ continue ;hfi1_put_irq_affinity (dd, &dd->msix_entries[i]);free_irq (me->msix.vector, me->arg);
@@ -12534,7 +12534,7 @@ static int request_msix_irqs(struct hfi1_devdata *dd)continue ; }/* no argument, no interrupt */ -if (arg ==NULL ) +if (!arg)continue ;/* make sure the name is terminated */ me->name[sizeof (me->name) -1 ] =0 ;
drivers/staging/rdma/hfi1/debugfs.c +1 -1
@@ -746,7 +746,7 @@ void hfi1_dbg_ibdev_init(struct hfi1_ibdev *ibd) ibd->hfi1_ibdev_dbg, ppd, &port_cntr_ops[i].ops, - port_cntr_ops[i].ops.write ==NULL ? + !port_cntr_ops[i].ops.write ? S_IRUGO : S_IRUGO | S_IWUSR); } }
drivers/staging/rdma/hfi1/driver.c +3 -3
@@ -371,7 +371,7 @@ static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd,if (rhf_use_egr_bfr (packet->rhf)) ebuf = packet->ebuf; -if (ebuf ==NULL ) +if (!ebuf) goto drop;/* this should never happen */ if (lnh ==HFI1_LRH_BTH )
@@ -402,7 +402,7 @@ static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd, lqpn =be32_to_cpu (bth[1 ]) &RVT_QPN_MASK ;rcu_read_lock (); qp =rvt_lookup_qpn (rdi, &ibp->rvp, lqpn); -if (qp ==NULL ) { +if (!qp) {rcu_read_unlock (); goto drop; }
@@ -637,7 +637,7 @@ static void __prescan_rxq(struct hfi1_packet *packet)rcu_read_lock (); qp =rvt_lookup_qpn (rdi, &ibp->rvp, qpn); -if (qp ==NULL ) { +if (!qp) {rcu_read_unlock (); goto next; }
drivers/staging/rdma/hfi1/init.c +2 -2
@@ -386,7 +386,7 @@ void set_link_ipg(struct hfi1_pportdata *ppd) cc_state =get_cc_state (ppd); -if (cc_state ==NULL ) +if (!cc_state)/* * This should _never_ happen - rcu_read_lock() is held, * and set_link_ipg() should not be called if cc_state
@@ -438,7 +438,7 @@ static enum hrtimer_restart cca_timer_fn(struct hrtimer *t) cc_state =get_cc_state (ppd); -if (cc_state ==NULL ) { +if (!cc_state) {rcu_read_unlock ();return HRTIMER_NORESTART ; }
drivers/staging/rdma/hfi1/mad.c +4 -4
@@ -3297,7 +3297,7 @@ static int __subn_get_opa_cong_setting(struct opa_smp *smp, u32 am, cc_state =get_cc_state (ppd); -if (cc_state ==NULL ) { +if (!cc_state) {rcu_read_unlock ();return reply ((struct ib_mad_hdr *)smp); }
@@ -3439,7 +3439,7 @@ static int __subn_get_opa_cc_table(struct opa_smp *smp, u32 am, u8 *data, cc_state =get_cc_state (ppd); -if (cc_state ==NULL ) { +if (!cc_state) {rcu_read_unlock ();return reply ((struct ib_mad_hdr *)smp); }
@@ -3505,14 +3505,14 @@ static int __subn_set_opa_cc_table(struct opa_smp *smp, u32 am, u8 *data, } new_cc_state =kzalloc (sizeof (*new_cc_state),GFP_KERNEL ); -if (new_cc_state ==NULL ) +if (!new_cc_state) goto getit;spin_lock (&ppd->cc_state_lock); old_cc_state =get_cc_state (ppd); -if (old_cc_state ==NULL ) { +if (!old_cc_state) {spin_unlock (&ppd->cc_state_lock);kfree (new_cc_state);return reply ((struct ib_mad_hdr *)smp);
drivers/staging/rdma/hfi1/pio.c +1 -1
@@ -2002,7 +2002,7 @@ int init_credit_return(struct hfi1_devdata *dd) bytes, &dd->cr_base[i].pa, GFP_KERNEL); -if (dd->cr_base[i].va ==NULL ) { +if (!dd->cr_base[i].va) {set_dev_node (&dd->pcidev->dev, dd->node); dd_dev_err(dd, "Unable to allocate credit return DMA range for NUMA %d\n",
drivers/staging/rdma/hfi1/rc.c +1 -1
@@ -2025,7 +2025,7 @@ void process_becn(struct hfi1_pportdata *ppd, u8 sl, u16 rlid, u32 lqpn, cc_state =get_cc_state (ppd); -if (cc_state ==NULL ) +if (!cc_state)return ;/*
drivers/staging/rdma/hfi1/sysfs.c +2 -2
@@ -83,7 +83,7 @@ static ssize_t read_cc_table_bin(struct file *filp, struct kobject *kobj,rcu_read_lock (); cc_state =get_cc_state (ppd); -if (cc_state ==NULL ) { +if (!cc_state) {rcu_read_unlock ();return -EINVAL ; }
@@ -130,7 +130,7 @@ static ssize_t read_cc_setting_bin(struct file *filp, struct kobject *kobj,rcu_read_lock (); cc_state =get_cc_state (ppd); -if (cc_state ==NULL ) { +if (!cc_state) {rcu_read_unlock ();return -EINVAL ; }
drivers/staging/rdma/hfi1/verbs.c +2 -2
@@ -431,7 +431,7 @@ void hfi1_ib_rcv(struct hfi1_packet *packet)if (lnh !=HFI1_LRH_GRH ) goto drop; mcast =rvt_mcast_find (&ibp->rvp, &hdr->u.l.grh.dgid); -if (mcast ==NULL ) +if (!mcast) goto drop;list_for_each_entry_rcu (p, &mcast->qp_list, list) { packet->qp = p->qp;
@@ -838,7 +838,7 @@ int hfi1_verbs_send_pio(struct rvt_qp *qp, struct hfi1_pkt_state *ps,if (cb)iowait_pio_inc (&priv->s_iowait); pbuf =sc_buffer_alloc (sc, plen, cb, qp); -if (unlikely (pbuf ==NULL )) { +if (unlikely (!pbuf)) {if (cb)verbs_pio_complete (qp,0 );if (ppd->host_link_state !=HLS_UP_ACTIVE ) {
--
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 5/21 staging/rdma/hfi1: Remove blank line after an open brace
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Remove blank line after an open brace to fix checkpatch check:
CHECK: Blank lines aren't necessary after an open brace '{'
--- drivers/staging/rdma/hfi1/chip.c | 5 ----- drivers/staging/rdma/hfi1/driver.c | 3 --- drivers/staging/rdma/hfi1/mad.c | 2 -- drivers/staging/rdma/hfi1/qp.c | 1 - drivers/staging/rdma/hfi1/qsfp.c | 2 -- drivers/staging/rdma/hfi1/sdma.c | 2 -- 6 files changed, 0 insertions(+), 15 deletions(-)
drivers/staging/rdma/hfi1/chip.c +0 -5
@@ -1538,7 +1538,6 @@ static u64 read_write_cpu(struct hfi1_devdata *dd, u64 *z_val,u64 __percpu *cntr, int vl, int mode, u64 data) { - u64 ret = 0;if (vl !=CNTR_INVALID_VL )
@@ -5931,7 +5930,6 @@ static void handle_qsfp_int(struct hfi1_devdata *dd, u32 src_ctx, u64 reg)u64 qsfp_int_mgmt = (u64)(QSFP_HFI0_INT_N |QSFP_HFI0_MODPRST_N );if (reg &QSFP_HFI0_MODPRST_N ) { -dd_dev_info (dd,"%s: ModPresent triggered QSFP interrupt\n" , __func__);
@@ -5995,7 +5993,6 @@ static void handle_qsfp_int(struct hfi1_devdata *dd, u32 src_ctx, u64 reg) }if (reg &QSFP_HFI0_INT_N ) { -dd_dev_info (dd,"%s: IntN triggered QSFP interrupt\n" , __func__);spin_lock_irqsave (&ppd->qsfp_info.qsfp_lock, flags);
@@ -9266,7 +9263,6 @@ void qsfp_event(struct work_struct *work)dc_start (dd);if (qd->cache_refresh_required) { -set_qsfp_int_n (ppd,0 );wait_for_qsfp_init (ppd);
@@ -10122,7 +10118,6 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)"%s: logical state did not change to ACTIVE\n" , __func__); }else { -/* tell all engines to go running */ sdma_all_running (dd);
drivers/staging/rdma/hfi1/driver.c +0 -3
@@ -440,7 +440,6 @@ drop:static inline void init_packet (struct hfi1_ctxtdata *rcd,struct hfi1_packet *packet) { - packet->rsize = rcd->rcvhdrqentsize;/* words */ packet->maxcnt = rcd->rcvhdrq_cnt * packet->rsize;/* words */ packet->rcd = rcd;
@@ -755,7 +754,6 @@ static inline void process_rcv_update(int last, struct hfi1_packet *packet)static inline void finish_packet (struct hfi1_packet *packet) { -/* * Nothing we need to free for the packet. *
@@ -769,7 +767,6 @@ static inline void finish_packet(struct hfi1_packet *packet)static inline void process_rcv_qp_work (struct hfi1_packet *packet) { -struct hfi1_ctxtdata *rcd;struct rvt_qp *qp, *nqp;
drivers/staging/rdma/hfi1/mad.c +0 -2
@@ -2183,7 +2183,6 @@ struct opa_port_error_info_msg {__be32 error_info_select_mask;__be32 reserved1;struct _port_ei { -u8 port_number;u8 reserved2[7 ];
@@ -3140,7 +3139,6 @@ static int pma_set_opa_portstatus(struct opa_pma_mad *pmp,for_each_set_bit (vl, (unsigned long *)&(vl_select_mask),8 *sizeof (vl_select_mask)) { -if (counter_select &CS_PORT_XMIT_DATA )write_port_cntr (ppd,C_TX_FLIT_VL ,idx_from_vl (vl),0 );
drivers/staging/rdma/hfi1/qp.c +0 -1
@@ -464,7 +464,6 @@ static int iowait_sleep(spin_lock_irqsave (&qp->s_lock, flags);if (ib_rvt_state_ops[qp->state] &RVT_PROCESS_RECV_OK ) { -/* * If we couldn't queue the DMA request, save the info * and try again later rather than destroying the
drivers/staging/rdma/hfi1/qsfp.c +0 -2
@@ -359,7 +359,6 @@ int refresh_qsfp_cache(struct hfi1_pportdata *ppd, struct qsfp_data *cp)/* Is paging enabled? */ if (!(cache[2 ] &4 )) { -/* Paging enabled, page 03 required */ if ((cache[195 ] &0xC0 ) ==0xC0 ) {/* all */
@@ -520,7 +519,6 @@ int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len) lenstr[1 ] ='\0' ;if (ppd->qsfp_info.cache_valid) { -if (QSFP_IS_CU (cache[QSFP_MOD_TECH_OFFS ]))sprintf (lenstr,"%dM " , cache[QSFP_MOD_LEN_OFFS ]);
drivers/staging/rdma/hfi1/sdma.c +0 -2
@@ -475,7 +475,6 @@ static void sdma_err_halt_wait(struct work_struct *work)static void sdma_err_progress_check_schedule (struct sdma_engine *sde) {if (!is_bx (sde->dd) &&HFI1_CAP_IS_KSET (SDMA_AHG )) { -unsigned index;struct hfi1_devdata *dd = sde->dd;
@@ -1239,7 +1238,6 @@ void sdma_exit(struct hfi1_devdata *dd)for (this_idx =0 ; dd->per_sdma && this_idx < dd->num_sdma; ++this_idx) { - sde = &dd->per_sdma[this_idx];if (!list_empty (&sde->dmawait)) dd_dev_err(dd, "sde %u: dmawait list not empty!\n",
--
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 6/21 staging/rdma/hfi1: Remove blank line before close brace
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Remove extra blank line before close brace to fix checkpatch check:
CHECK: Blank lines aren't necessary before a close brace '}'
--- drivers/staging/rdma/hfi1/chip.c | 1 - drivers/staging/rdma/hfi1/driver.c | 1 - drivers/staging/rdma/hfi1/intr.c | 1 - drivers/staging/rdma/hfi1/mad.c | 2 -- drivers/staging/rdma/hfi1/pcie.c | 1 - drivers/staging/rdma/hfi1/sysfs.c | 1 - drivers/staging/rdma/hfi1/uc.c | 1 - drivers/staging/rdma/hfi1/ud.c | 2 -- drivers/staging/rdma/hfi1/user_sdma.c | 2 -- 9 files changed, 0 insertions(+), 12 deletions(-)
drivers/staging/rdma/hfi1/chip.c +0 -1
@@ -13710,7 +13710,6 @@ static void assign_cm_au_table(struct hfi1_devdata *dd, u32 cu,SEND_CM_LOCAL_AU_TABLE4_TO7_LOCAL_AU_TABLE6_SHIFT |64ull * cu << SEND_CM_LOCAL_AU_TABLE4_TO7_LOCAL_AU_TABLE7_SHIFT); - }static void assign_local_cm_au_table (struct hfi1_devdata *dd,u8 vcu)
drivers/staging/rdma/hfi1/driver.c +0 -1
@@ -762,7 +762,6 @@ static inline void finish_packet(struct hfi1_packet *packet)*/ update_usrhead (packet->rcd, packet->rcd->head, packet->updegr, packet->etail, rcv_intr_dynamic, packet->numpkt); - }static inline void process_rcv_qp_work (struct hfi1_packet *packet)
drivers/staging/rdma/hfi1/intr.c +0 -1
@@ -178,7 +178,6 @@ void handle_linkup_change(struct hfi1_devdata *dd, u32 linkup)/* notify IB of the link change */ signal_ib_event (ppd, ev); } - }/*
drivers/staging/rdma/hfi1/mad.c +0 -2
@@ -3805,7 +3805,6 @@ static int subn_get_opa_aggregate(struct opa_smp *smp,return reply ((struct ib_mad_hdr *)smp); } next_smp += agg_size; - }return reply ((struct ib_mad_hdr *)smp);
@@ -3849,7 +3848,6 @@ static int subn_set_opa_aggregate(struct opa_smp *smp,return reply ((struct ib_mad_hdr *)smp); } next_smp += agg_size; - }return reply ((struct ib_mad_hdr *)smp);
drivers/staging/rdma/hfi1/pcie.c +0 -1
@@ -316,7 +316,6 @@ do_intx: nvec, ret); *msixcnt =0 ;hfi1_enable_intx (dd->pcidev); - }/* return the PCIe link speed from the given link status */
drivers/staging/rdma/hfi1/sysfs.c +0 -1
@@ -568,7 +568,6 @@ static ssize_t show_serial(struct device *device,struct hfi1_devdata *dd =dd_from_dev (dev);return scnprintf (buf,PAGE_SIZE ,"%s" , dd->serial); - } static ssize_t store_chip_reset(struct device *device,
drivers/staging/rdma/hfi1/uc.c +0 -1
@@ -604,5 +604,4 @@ drop: op_err:hfi1_rc_error (qp,IB_WC_LOC_QP_OP_ERR );return ; - }
drivers/staging/rdma/hfi1/ud.c +0 -2
@@ -772,7 +772,6 @@ void hfi1_ud_rcv(struct hfi1_packet *packet) mgmt_pkey_idx =hfi1_lookup_pkey_idx (ibp, pkey);if (mgmt_pkey_idx <0 ) goto drop; - }if (unlikely (qkey != qp->qkey)) { hfi1_bad_pqkey(ibp, OPA_TRAP_BAD_Q_KEY, qkey,
@@ -810,7 +809,6 @@ void hfi1_ud_rcv(struct hfi1_packet *packet) mgmt_pkey_idx =hfi1_lookup_pkey_idx (ibp, pkey);if (mgmt_pkey_idx <0 ) goto drop; - } if (qp->ibqp.qp_num > 1 &&
drivers/staging/rdma/hfi1/user_sdma.c +0 -2
@@ -713,7 +713,6 @@ int hfi1_user_sdma_process_request(struct file *fp, struct iovec *iovec,msecs_to_jiffies ( SDMA_IOWAIT_TIMEOUT)); } - } *count += idx;return 0 ;
@@ -1194,7 +1193,6 @@ static int set_txreq_header(struct user_sdma_request *req,if (ret)return ret; goto done; - } hdr->bth[2] = cpu_to_be32(
--
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 7/21 staging/rdma/hfi1: Fix logical continuations
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Move logical continuations to previous line to fix checkpatch check:
CHECK: Logical continuations should be on the previous line
--- drivers/staging/rdma/hfi1/chip.c | 55 ++++++++++++++++------------------ drivers/staging/rdma/hfi1/driver.c | 6 ++-- drivers/staging/rdma/hfi1/file_ops.c | 12 ++++--- drivers/staging/rdma/hfi1/firmware.c | 20 ++++-------- drivers/staging/rdma/hfi1/intr.c | 3 +- drivers/staging/rdma/hfi1/mad.c | 12 ++++--- drivers/staging/rdma/hfi1/sdma.c | 4 +- 7 files changed, 51 insertions(+), 61 deletions(-)
drivers/staging/rdma/hfi1/chip.c +26 -29
@@ -6552,8 +6552,8 @@ void handle_sma_message(struct work_struct *work)* * Can activate the node. Discard otherwise. */ -if (ppd->host_link_state ==HLS_UP_ARMED - && ppd->is_active_optimize_enabled) { +if (ppd->host_link_state ==HLS_UP_ARMED && + ppd->is_active_optimize_enabled) { ppd->neighbor_normal =1 ; ret =set_link_state (ppd,HLS_UP_ACTIVE );if (ret)
@@ -7032,8 +7032,8 @@ static void get_link_widths(struct hfi1_devdata *dd, u16 *tx_width,* handle_verify_cap(). The ASIC 8051 firmware does not correctly * set the max_rate field in handle_verify_cap until v0.19. */ -if ((dd->icode ==ICODE_RTL_SILICON ) - && (dd->dc8051_ver <dc8051_ver (0 ,19 ))) { +if ((dd->icode ==ICODE_RTL_SILICON ) && + (dd->dc8051_ver <dc8051_ver (0 ,19 ))) {/* max_rate: 0 = 12.5G, 1 = 25G */ switch (max_rate) {case 0 :
@@ -7358,10 +7358,8 @@ retry:/* downgrade is disabled */ /* bounce if not at starting active width */ -if ((ppd->link_width_active != - ppd->link_width_downgrade_tx_active) - || (ppd->link_width_active != - ppd->link_width_downgrade_rx_active)) { +if ((ppd->link_width_active != ppd->link_width_downgrade_tx_active) || + (ppd->link_width_active != ppd->link_width_downgrade_rx_active)) {dd_dev_err (ppd->dd,"Link downgrade is disabled and link has downgraded, downing link\n" ); dd_dev_err(ppd->dd,
@@ -7371,8 +7369,8 @@ retry: ppd->link_width_downgrade_rx_active); do_bounce =1 ; } - }else if ((lwde & ppd->link_width_downgrade_tx_active) ==0 - || (lwde & ppd->link_width_downgrade_rx_active) ==0 ) { + }else if ((lwde & ppd->link_width_downgrade_tx_active) ==0 || + (lwde & ppd->link_width_downgrade_rx_active) ==0 ) {/* Tx or Rx is outside the enabled policy */ dd_dev_err (ppd->dd,"Link is outside of downgrade allowed, downing link\n" );
@@ -7567,9 +7565,9 @@ static void handle_8051_interrupt(struct hfi1_devdata *dd, u32 unused, u64 reg)if (queue_link_down) {/* if the link is already going down or disabled, do not * queue another */ -if ((ppd->host_link_state - & (HLS_GOING_OFFLINE |HLS_LINK_COOLDOWN )) - || ppd->link_enabled ==0 ) { +if ((ppd->host_link_state & + (HLS_GOING_OFFLINE |HLS_LINK_COOLDOWN )) || + ppd->link_enabled ==0 ) {dd_dev_info (dd,"%s: not queuing link down\n" , __func__); }else {
@@ -8888,10 +8886,9 @@ static int init_loopback(struct hfi1_devdata *dd)* * Accept all valid loopback values. */ -if ((dd->icode ==ICODE_FUNCTIONAL_SIMULATOR ) - && (loopback ==LOOPBACK_SERDES - || loopback ==LOOPBACK_LCB - || loopback ==LOOPBACK_CABLE )) { +if ((dd->icode ==ICODE_FUNCTIONAL_SIMULATOR ) && + (loopback ==LOOPBACK_SERDES || loopback ==LOOPBACK_LCB || + loopback ==LOOPBACK_CABLE )) { loopback =LOOPBACK_LCB ; quick_linkup =1 ;return 0 ;
@@ -10020,8 +10017,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state) state = dd->link_default;/* interpret poll -> poll as a link bounce */ - poll_bounce = ppd->host_link_state ==HLS_DN_POLL - && state ==HLS_DN_POLL ; + poll_bounce = ppd->host_link_state ==HLS_DN_POLL && + state ==HLS_DN_POLL ; dd_dev_info(dd, "%s: current %s, new %s %s%s\n", __func__, link_state_name(ppd->host_link_state),
@@ -10048,8 +10045,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)switch (state) {case HLS_UP_INIT : -if (ppd->host_link_state ==HLS_DN_POLL && (quick_linkup - || dd->icode ==ICODE_FUNCTIONAL_SIMULATOR )) { +if (ppd->host_link_state ==HLS_DN_POLL && + (quick_linkup || dd->icode ==ICODE_FUNCTIONAL_SIMULATOR )) {/* * Quick link up jumps from polling to here. *
@@ -10779,8 +10776,8 @@ int set_buffer_control(struct hfi1_pportdata *ppd, != cur_bc.vl[i].shared;if (this_shared_changing) any_shared_limit_changing =1 ; -if (new_bc->vl[i].dedicated != cur_bc.vl[i].dedicated - || this_shared_changing) { +if (new_bc->vl[i].dedicated != cur_bc.vl[i].dedicated || + this_shared_changing) { changing[i] =1 ; changing_mask |= stat_mask; change_count++;
@@ -11227,8 +11224,8 @@ void hfi1_rcvctrl(struct hfi1_devdata *dd, unsigned int op, int ctxt) rcvctrl =read_kctxt_csr (dd, ctxt,RCV_CTXT_CTRL );/* if the context already enabled, don't do the extra steps */ -if ((op &HFI1_RCVCTRL_CTXT_ENB ) - && !(rcvctrl &RCV_CTXT_CTRL_ENABLE_SMASK )) { +if ((op &HFI1_RCVCTRL_CTXT_ENB ) && + !(rcvctrl &RCV_CTXT_CTRL_ENABLE_SMASK )) {/* reset the tail and hdr addresses, and sequence count */ write_kctxt_csr (dd, ctxt,RCV_HDR_ADDR , rcd->rcvhdrq_phys);
@@ -11344,8 +11341,8 @@ void hfi1_rcvctrl(struct hfi1_devdata *dd, unsigned int op, int ctxt)write_kctxt_csr (dd, ctxt,RCV_CTXT_CTRL , rcd->rcvctrl);/* work around sticky RcvCtxtStatus.BlockedRHQFull */ -if (did_enable - && (rcvctrl &RCV_CTXT_CTRL_DONT_DROP_RHQ_FULL_SMASK )) { +if (did_enable && + (rcvctrl &RCV_CTXT_CTRL_DONT_DROP_RHQ_FULL_SMASK )) { reg =read_kctxt_csr (dd, ctxt,RCV_CTXT_STATUS );if (reg !=0 ) { dd_dev_info(dd, "ctxt %d status %lld (blocked)\n",
@@ -13989,8 +13986,8 @@ struct hfi1_devdata *hfi1_init_dd(struct pci_dev *pdev,/* link width active is 0 when link is down */ /* link width downgrade active is 0 when link is down */ -if (num_vls <HFI1_MIN_VLS_SUPPORTED - || num_vls >HFI1_MAX_VLS_SUPPORTED ) { +if (num_vls <HFI1_MIN_VLS_SUPPORTED || + num_vls >HFI1_MAX_VLS_SUPPORTED ) {hfi1_early_err (&pdev->dev,"Invalid num_vls %u, using %u VLs\n" , num_vls,HFI1_MAX_VLS_SUPPORTED );
drivers/staging/rdma/hfi1/driver.c +3 -3
@@ -1123,9 +1123,9 @@ int set_mtu(struct hfi1_pportdata *ppd) ppd->ibmaxlen = ppd->ibmtu +lrh_max_header_bytes (ppd->dd);mutex_lock (&ppd->hls_lock); -if (ppd->host_link_state ==HLS_UP_INIT - || ppd->host_link_state ==HLS_UP_ARMED - || ppd->host_link_state ==HLS_UP_ACTIVE ) +if (ppd->host_link_state ==HLS_UP_INIT || + ppd->host_link_state ==HLS_UP_ARMED || + ppd->host_link_state ==HLS_UP_ACTIVE ) is_up =1 ; drain = !is_ax (dd) && is_up;
drivers/staging/rdma/hfi1/file_ops.c +6 -6
@@ -1626,12 +1626,12 @@ static ssize_t ui_read(struct file *filp, char __user *buf, size_t count,* them. These registers are defined as having a read value * of 0. */ - else if (csr_off == ASIC_GPIO_CLEAR - || csr_off == ASIC_GPIO_FORCE - || csr_off == ASIC_QSFP1_CLEAR - || csr_off == ASIC_QSFP1_FORCE - || csr_off == ASIC_QSFP2_CLEAR - || csr_off == ASIC_QSFP2_FORCE) + else if (csr_off == ASIC_GPIO_CLEAR || + csr_off == ASIC_GPIO_FORCE || + csr_off == ASIC_QSFP1_CLEAR || + csr_off == ASIC_QSFP1_FORCE || + csr_off == ASIC_QSFP2_CLEAR || + csr_off == ASIC_QSFP2_FORCE) data =0 ; else if (csr_off >= barlen) {/*
drivers/staging/rdma/hfi1/firmware.c +7 -13
@@ -391,19 +391,13 @@ static int invalid_header(struct hfi1_devdata *dd, const char *what,static int verify_css_header (struct hfi1_devdata *dd,struct css_header *css) {/* verify CSS header fields (most sizes are in DW, so add /4) */ -if (invalid_header (dd,"module_type" , css->module_type,CSS_MODULE_TYPE ) - ||invalid_header (dd,"header_len" , css->header_len, - (sizeof (struct firmware_file ) /4 )) - ||invalid_header (dd,"header_version" , - css->header_version,CSS_HEADER_VERSION ) - ||invalid_header (dd,"module_vendor" , - css->module_vendor,CSS_MODULE_VENDOR ) - ||invalid_header (dd,"key_size" , - css->key_size,KEY_SIZE /4 ) - ||invalid_header (dd,"modulus_size" , - css->modulus_size,KEY_SIZE /4 ) - ||invalid_header (dd,"exponent_size" , - css->exponent_size,EXPONENT_SIZE /4 )) { +if (invalid_header (dd,"module_type" , css->module_type,CSS_MODULE_TYPE ) || +invalid_header (dd,"header_len" , css->header_len, (sizeof (struct firmware_file ) /4 )) || +invalid_header (dd,"header_version" , css->header_version,CSS_HEADER_VERSION ) || +invalid_header (dd,"module_vendor" , css->module_vendor,CSS_MODULE_VENDOR ) || +invalid_header (dd,"key_size" , css->key_size,KEY_SIZE /4 ) || +invalid_header (dd,"modulus_size" , css->modulus_size,KEY_SIZE /4 ) || +invalid_header (dd,"exponent_size" , css->exponent_size,EXPONENT_SIZE /4 )) {return -EINVAL ; }return 0 ;
drivers/staging/rdma/hfi1/intr.c +1 -2
@@ -131,8 +131,7 @@ void handle_linkup_change(struct hfi1_devdata *dd, u32 linkup)* NOTE: This uses this device's vAU, vCU, and vl15_init for * the remote values. Both sides must be using the values. */ -if (quick_linkup - || dd->icode ==ICODE_FUNCTIONAL_SIMULATOR ) { +if (quick_linkup || dd->icode ==ICODE_FUNCTIONAL_SIMULATOR ) {set_up_vl15 (dd, dd->vau, dd->vl15_init);assign_remote_cm_au_table (dd, dd->vcu); ppd->neighbor_guid =
drivers/staging/rdma/hfi1/mad.c +6 -6
@@ -1170,8 +1170,8 @@ static int __subn_set_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data, ppd->port_error_action =be32_to_cpu (pi->port_error_action); lwe =be16_to_cpu (pi->link_width.enabled);if (lwe) { -if (lwe ==OPA_LINK_WIDTH_RESET - || lwe ==OPA_LINK_WIDTH_RESET_OLD ) +if (lwe ==OPA_LINK_WIDTH_RESET || + lwe ==OPA_LINK_WIDTH_RESET_OLD )set_link_width_enabled (ppd, ppd->link_width_supported);else if ((lwe & ~ppd->link_width_supported) ==0 )set_link_width_enabled (ppd, lwe);
@@ -1180,8 +1180,8 @@ static int __subn_set_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data, } lwe =be16_to_cpu (pi->link_width_downgrade.enabled);/* LWD.E is always applied - 0 means "disabled" */ -if (lwe ==OPA_LINK_WIDTH_RESET - || lwe ==OPA_LINK_WIDTH_RESET_OLD ) { +if (lwe ==OPA_LINK_WIDTH_RESET || + lwe ==OPA_LINK_WIDTH_RESET_OLD ) {set_link_width_downgrade_enabled (ppd, ppd->link_width_downgrade_supported); }else if ((lwe & ~ppd->link_width_downgrade_supported) ==0 ) {
@@ -2335,8 +2335,8 @@ static int pma_get_opa_portstatus(struct opa_pma_mad *pmp,return reply ((struct ib_mad_hdr *)pmp); } -if (nports !=1 || (port_num && port_num != port) - || num_vls >OPA_MAX_VLS || (vl_select_mask & ~VL_MASK_ALL )) { +if (nports !=1 || (port_num && port_num != port) || + num_vls >OPA_MAX_VLS || (vl_select_mask & ~VL_MASK_ALL )) { pmp->mad_hdr.status |=IB_SMP_INVALID_FIELD ;return reply ((struct ib_mad_hdr *)pmp); }
drivers/staging/rdma/hfi1/sdma.c +2 -2
@@ -672,8 +672,8 @@ static void sdma_set_state(struct sdma_engine *sde, ss->previous_op = ss->current_op; ss->current_state = next_state; -if (ss->previous_state != sdma_state_s99_running - && next_state == sdma_state_s99_running) +if (ss->previous_state != sdma_state_s99_running && + next_state == sdma_state_s99_running)sdma_flush (sde);if (action[next_state].op_enable)
--
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 8/21 staging/rdma/hfi1: Add blank link after declarations
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Add blank line after declarations to fix checkpatch check:
CHECK: Please use a blank line after function/struct/union/enum declarations
--- drivers/staging/rdma/hfi1/chip.c | 2 ++ drivers/staging/rdma/hfi1/debugfs.c | 1 + drivers/staging/rdma/hfi1/firmware.c | 2 ++ drivers/staging/rdma/hfi1/hfi.h | 1 + drivers/staging/rdma/hfi1/pcie.c | 1 + drivers/staging/rdma/hfi1/pio.h | 1 + 6 files changed, 8 insertions(+), 0 deletions(-)
drivers/staging/rdma/hfi1/chip.c +2 -0
@@ -6995,6 +6995,7 @@ static u16 link_width_to_bits(struct hfi1_devdata *dd, u16 width)static const u8 bit_counts[16 ] = {0 ,1 ,1 ,2 ,1 ,2 ,2 ,3 ,1 ,2 ,2 ,3 ,2 ,3 ,3 ,4 }; +static inline u8 nibble_to_count (u8 nibble) {return bit_counts[nibble &0xf ];
@@ -10410,6 +10411,7 @@ static int vl_arb_match_cache(struct vl_arb_cache *cache, {return !memcmp (cache->table, vl,VL_ARB_TABLE_SIZE *sizeof (*vl)); } +/* end functions related to vl arbitration table caching */ static int set_vl_weights(struct hfi1_pportdata *ppd, u32 target,
drivers/staging/rdma/hfi1/debugfs.c +1 -0
@@ -71,6 +71,7 @@ static const struct seq_operations _##name##_seq_ops = { \ .stop = _##name##_seq_stop, \ .show = _##name##_seq_show \ } +#define DEBUGFS_SEQ_FILE_OPEN (name) \ static int _##name##_open(struct inode *inode, struct file *s) \ { \
drivers/staging/rdma/hfi1/firmware.c +2 -0
@@ -113,6 +113,7 @@ struct css_header {u32 exponent_size;/* in DWORDs */ u32 reserved[22 ]; }; +/* expected field values */ #define CSS_MODULE_TYPE 0x00000006#define CSS_HEADER_LEN 0x000000a1
@@ -172,6 +173,7 @@ enum fw_state {FW_FINAL , FW_ERR }; +static enum fw_state fw_state =FW_EMPTY ;static int fw_err;static struct firmware_details fw_8051;
drivers/staging/rdma/hfi1/hfi.h +1 -0
@@ -1495,6 +1495,7 @@ static inline int valid_ib_mtu(unsigned int mtu) mtu ==1024 || mtu ==2048 || mtu ==4096 ; } +static inline int valid_opa_max_mtu (unsigned int mtu) { return mtu >= 2048 &&
drivers/staging/rdma/hfi1/pcie.c +1 -0
@@ -529,6 +529,7 @@ static void tune_pcie_caps(struct hfi1_devdata *dd)pcie_set_readrq (dd->pcidev, ep_mrrs); } } +/* End of PCIe capability tuning */ /*
drivers/staging/rdma/hfi1/pio.h +1 -0
@@ -105,6 +105,7 @@ struct send_context {struct hfi1_devdata *dd;/* device */ void __iomem *base_addr;/* start of PIO memory */ union pio_shadow_ring *sr;/* shadow ring */ +volatile __le64 *hw_free;/* HW free counter */ struct work_struct halt_work;/* halted context work queue entry */ unsigned long flags;/* flags */
--
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 9/21 staging/rdma/hfi1: Remove unnecessary parentheses
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Remove unnecessary parentheses around addressof single $Lvals to fix checkpatch check:
CHECK: Unnecessary parentheses around $var
--- drivers/staging/rdma/hfi1/mad.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rdma/hfi1/mad.c +7 -7
@@ -2416,7 +2416,7 @@ static int pma_get_opa_portstatus(struct opa_pma_mad *pmp, tmp =read_dev_cntr (dd,C_DC_UNC_ERR ,CNTR_INVALID_VL ); rsp->uncorrectable_errors = tmp <0x100 ? (tmp &0xff ) :0xff ; - vlinfo = &(rsp->vls[0 ]); + vlinfo = &rsp->vls[0 ]; vfi =0 ;/* The vl_select_mask has been checked above, and we know * that it contains only entries which represent valid VLs.
@@ -2609,7 +2609,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,return reply ((struct ib_mad_hdr *)pmp); } - rsp = (struct _port_dctrs *)&(req->port[0 ]); + rsp = (struct _port_dctrs *)&req->port[0 ];memset (rsp,0 ,sizeof (*rsp)); rsp->port_number = port;
@@ -2632,7 +2632,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,cpu_to_be64 (get_error_counter_summary (ibdev, port, res_lli, res_ler)); - vlinfo = &(rsp->vls[0 ]); + vlinfo = &rsp->vls[0 ]; vfi =0 ;/* The vl_select_mask has been checked above, and we know * that it contains only entries which represent valid VLs.
@@ -2816,7 +2816,7 @@ static int pma_get_opa_porterrors(struct opa_pma_mad *pmp,return reply ((struct ib_mad_hdr *)pmp); } - rsp = (struct _port_ectrs *)&(req->port[0 ]); + rsp = (struct _port_ectrs *)&req->port[0 ]; ibp =to_iport (ibdev, port_num); ppd =ppd_from_ibp (ibp);
@@ -2836,7 +2836,7 @@ static int pma_get_opa_porterrors(struct opa_pma_mad *pmp, rsp->uncorrectable_errors = tmp <0x100 ? (tmp &0xff ) :0xff ; - vlinfo = (struct _vls_ectrs *)&(rsp->vls[0 ]); + vlinfo = (struct _vls_ectrs *)&rsp->vls[0 ]; vfi =0 ; vl_select_mask =be32_to_cpu (req->vl_select_mask); for_each_set_bit(vl, (unsigned long *)&(vl_select_mask),
@@ -2952,7 +2952,7 @@ static int pma_get_opa_errorinfo(struct opa_pma_mad *pmp,u64 reg; req = (struct opa_port_error_info_msg *)pmp->data; - rsp = (struct _port_ei *)&(req->port[0 ]); + rsp = (struct _port_ei *)&req->port[0 ]; num_ports =OPA_AM_NPORT (be32_to_cpu (pmp->mad_hdr.attr_mod)); num_pslm =hweight64 (be64_to_cpu (req->port_select_mask[3 ]));
@@ -3192,7 +3192,7 @@ static int pma_set_opa_errorinfo(struct opa_pma_mad *pmp,u32 error_info_select; req = (struct opa_port_error_info_msg *)pmp->data; - rsp = (struct _port_ei *)&(req->port[0 ]); + rsp = (struct _port_ei *)&req->port[0 ]; num_ports =OPA_AM_NPORT (be32_to_cpu (pmp->mad_hdr.attr_mod)); num_pslm =hweight64 (be64_to_cpu (req->port_select_mask[3 ]));
--
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 10/21 staging/rdma/hfi1: Use BIT_ULL macro
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Use BIT_ULL macro to fix checkpatch check:
CHECK: Prefer using the BIT_ULL macro
--- drivers/staging/rdma/hfi1/chip.h | 16 ++++++++-------- drivers/staging/rdma/hfi1/eprom.c | 2 +- drivers/staging/rdma/hfi1/sdma.h | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-)
drivers/staging/rdma/hfi1/chip.h +8 -8
@@ -93,15 +93,15 @@#define TXE_PIO_SEND (TXE + TXE_PIO_SEND_OFFSET)/* PBC flags */ -#define PBC_INTR (1ull << 31) +#define PBC_INTR BIT_ULL(31)#define PBC_DC_INFO_SHIFT (30) -#define PBC_DC_INFO (1ull << PBC_DC_INFO_SHIFT) -#define PBC_TEST_EBP (1ull << 29) -#define PBC_PACKET_BYPASS (1ull << 28) -#define PBC_CREDIT_RETURN (1ull << 25) -#define PBC_INSERT_BYPASS_ICRC (1ull << 24) -#define PBC_TEST_BAD_ICRC (1ull << 23) -#define PBC_FECN (1ull << 22) +#define PBC_DC_INFO BIT_ULL(PBC_DC_INFO_SHIFT) +#define PBC_TEST_EBP BIT_ULL(29) +#define PBC_PACKET_BYPASS BIT_ULL(28) +#define PBC_CREDIT_RETURN BIT_ULL(25) +#define PBC_INSERT_BYPASS_ICRC BIT_ULL(24) +#define PBC_TEST_BAD_ICRC BIT_ULL(23) +#define PBC_FECN BIT_ULL(22)/* PbcInsertHcrc field settings */ #define PBC_IHCRC_LKDETH 0x0/* insert @ local KDETH offset */
drivers/staging/rdma/hfi1/eprom.c +1 -1
@@ -102,7 +102,7 @@#define COUNT_DELAY_SEC (n) ((n) * (1000000 / WAIT_SLEEP_US))/* GPIO pins */ -#define EPROM_WP_N (1ull << 14)/* EPROM write line */ +#define EPROM_WP_N BIT_ULL(14)/* EPROM write line */ /* * Use the EP mutex to guard against other callers from within the driver.
drivers/staging/rdma/hfi1/sdma.h +4 -4
@@ -107,8 +107,8 @@/* * Bits defined in the send DMA descriptor. */ -#define SDMA_DESC0_FIRST_DESC_FLAG (1ULL << 63) -#define SDMA_DESC0_LAST_DESC_FLAG (1ULL << 62) +#define SDMA_DESC0_FIRST_DESC_FLAG BIT_ULL(63) +#define SDMA_DESC0_LAST_DESC_FLAG BIT_ULL(62)#define SDMA_DESC0_BYTE_COUNT_SHIFT 48#define SDMA_DESC0_BYTE_COUNT_WIDTH 14#define SDMA_DESC0_BYTE_COUNT_MASK \
@@ -152,8 +152,8 @@ ((1ULL << SDMA_DESC1_GENERATION_WIDTH) - 1)#define SDMA_DESC1_GENERATION_SMASK \ (SDMA_DESC1_GENERATION_MASK << SDMA_DESC1_GENERATION_SHIFT) -#define SDMA_DESC1_INT_REQ_FLAG (1ULL << 1) -#define SDMA_DESC1_HEAD_TO_HOST_FLAG (1ULL << 0) +#define SDMA_DESC1_INT_REQ_FLAG BIT_ULL(1) +#define SDMA_DESC1_HEAD_TO_HOST_FLAG BIT_ULL(0)enum sdma_states { sdma_state_s00_hw_down,
--
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 11/21 staging/rdma/hfi1: Split multiple assignments
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Split multiple assignments into individual assignments to fix checkpatch check:
CHECK: multiple assignments should be avoided
--- drivers/staging/rdma/hfi1/chip.c | 6 ++++-- drivers/staging/rdma/hfi1/mad.c | 8 ++++---- drivers/staging/rdma/hfi1/sdma.h | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-)
drivers/staging/rdma/hfi1/chip.c +4 -2
@@ -12459,8 +12459,10 @@ static int request_msix_irqs(struct hfi1_devdata *dd)/* calculate the ranges we are going to use */ first_general =0 ; - first_sdma = last_general = first_general +1 ; - first_rx = last_sdma = first_sdma + dd->num_sdma; + last_general = first_general +1 ; + first_sdma = last_general; + last_sdma = first_sdma + dd->num_sdma; + first_rx = last_sdma; last_rx = first_rx + dd->n_krcv_queues;/*
drivers/staging/rdma/hfi1/mad.c +4 -4
@@ -896,8 +896,8 @@ static int port_states_transition_allowed(struct hfi1_pportdata *ppd,u32 logical_old =driver_logical_state (ppd);int ret, logical_allowed, physical_allowed; - logical_allowed = ret = -logical_transition_allowed (logical_old, logical_new); + ret =logical_transition_allowed (logical_old, logical_new); + logical_allowed = ret;if (ret ==HFI_TRANSITION_DISALLOWED || ret ==HFI_TRANSITION_UNDEFINED ) {
@@ -907,8 +907,8 @@ static int port_states_transition_allowed(struct hfi1_pportdata *ppd,return ret; } - physical_allowed = ret = -physical_transition_allowed (physical_old, physical_new); + ret =physical_transition_allowed (physical_old, physical_new); + physical_allowed = ret;if (ret ==HFI_TRANSITION_DISALLOWED || ret ==HFI_TRANSITION_UNDEFINED ) {
drivers/staging/rdma/hfi1/sdma.h +2 -1
@@ -565,7 +565,8 @@ static inline int sdma_txinit_ahg( tx->complete = cb; tx->coalesce_buf =NULL ; tx->wait =NULL ; - tx->tlen = tx->packet_len = tlen; + tx->packet_len = tlen; + tx->tlen = tx->packet_len; tx->descs[0 ].qw[0 ] =SDMA_DESC0_FIRST_DESC_FLAG ; tx->descs[0 ].qw[1 ] =0 ;if (flags &SDMA_TXREQ_F_AHG_COPY )
--
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 12/21 staging/rdma/hfi1: Fix misspellings
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Fix misspelled word based on checkpatch check:
CHECK: 'ffoo' may be misspelled - perhaps 'foo'?
--- drivers/staging/rdma/hfi1/chip.c | 2 +- drivers/staging/rdma/hfi1/qsfp.c | 2 +- drivers/staging/rdma/hfi1/sdma.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rdma/hfi1/chip.c +1 -1
@@ -8080,7 +8080,7 @@ static inline int check_packet_present(struct hfi1_ctxtdata *rcd)* Receive packet IRQ handler. This routine expects to be on its own IRQ. * This routine will try to handle packets immediately (latency), but if * it finds too many, it will invoke the thread handler (bandwitdh). The -* chip receive interupt is *not* cleared down until this or the thread (if +* chip receive interrupt is *not* cleared down until this or the thread (if * invoked) is finished. The intent is to avoid extra interrupts while we * are processing packets anyway. */
drivers/staging/rdma/hfi1/qsfp.c +1 -1
@@ -216,7 +216,7 @@ int qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp,while (count < len) {/* -* Set the qsfp page based on a zero-based addresss +* Set the qsfp page based on a zero-based address * and a page size of QSFP_PAGESIZE bytes. */ page = (u8)(addr /QSFP_PAGESIZE );
drivers/staging/rdma/hfi1/sdma.c +1 -1
@@ -2740,7 +2740,7 @@ enomem:* This function calls _extend_sdma_tx_descs to extend or allocate * coalesce buffer. If there is a allocated coalesce buffer, it will * copy the input packet data into the coalesce buffer. It also adds -* coalesce buffer descriptor once whe whole packet is received. +* coalesce buffer descriptor once when whole packet is received. * * Return: * <0 - error
--
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 13/21 staging/rdma/hfi1: Remove CamelCase
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Remove CamelCase to fix checkpatch check:
CHECK: Avoid CamelCase: <PLS_CONFIGPHY_ESTcOMM_LOCAL_COMPLETE>
--- drivers/staging/rdma/hfi1/chip.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/rdma/hfi1/chip.h +1 -1
@@ -212,7 +212,7 @@#define PLS_CONFIGPHY_DEBOUCE 0x40#define PLS_CONFIGPHY_ESTCOMM 0x41#define PLS_CONFIGPHY_ESTCOMM_TXRX_HUNT 0x42 -#define PLS_CONFIGPHY_ESTcOMM_LOCAL_COMPLETE 0x43 +#define PLS_CONFIGPHY_ESTCOMM_LOCAL_COMPLETE 0x43#define PLS_CONFIGPHY_OPTEQ 0x44#define PLS_CONFIGPHY_OPTEQ_OPTIMIZING 0x44#define PLS_CONFIGPHY_OPTEQ_LOCAL_COMPLETE 0x45
--
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 14/21 staging/rdma/hfi1: Use pointer instead of struct name
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Use sizeof(*p) instead of sizeof(struct foo) to fix checkpatch check:
CHECK: Prefer alloc(sizeof(*p)...) over alloc(sizeof(struct foo)...)
--- drivers/staging/rdma/hfi1/pio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/rdma/hfi1/pio.c +1 -1
@@ -700,7 +700,7 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type,if (dd->flags &HFI1_FROZEN )return NULL ; - sc =kzalloc_node (sizeof (struct send_context ),GFP_KERNEL , numa); + sc =kzalloc_node (sizeof (*sc),GFP_KERNEL , numa);if (!sc)return NULL ;
--
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 15/21 staging/rdma/hfi1: Remove void function return statement
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Remove return statement at the end of a void function to fix checkpatch warning:
WARNING: void function return statements are not generally useful
--- drivers/staging/rdma/hfi1/uc.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/staging/rdma/hfi1/uc.c +0 -1
@@ -603,5 +603,4 @@ drop: op_err:hfi1_rc_error (qp,IB_WC_LOC_QP_OP_ERR ); -return ; }
--
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 16/21 staging/rdma/hfi1: Add comment for spinlock_t definition
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Add comments describing the spinlock for spinlock_t definitions to fix checkpatch check:
CHECK: spinlock_t definition without comment
--- drivers/staging/rdma/hfi1/hfi.h | 3 +++ drivers/staging/rdma/hfi1/qsfp.h | 1 + drivers/staging/rdma/hfi1/sdma.h | 1 + 3 files changed, 5 insertions(+), 0 deletions(-)
drivers/staging/rdma/hfi1/hfi.h +3 -0
@@ -313,6 +313,7 @@ struct hfi1_ctxtdata {*/ struct task_struct *progress;struct list_head sdma_queues; +/* protect sdma queues */ spinlock_t sdma_qlock;/* Is ASPM interrupt supported for this context */
@@ -380,6 +381,7 @@ struct hfi1_snoop_data {int mode_flag;struct cdev cdev;struct device *class_dev; +/* protect snoop data */ spinlock_t snoop_lock;struct list_head queue;wait_queue_head_t waitq;
@@ -561,6 +563,7 @@ enum { };struct vl_arb_cache { +/* protect vl arb cache */ spinlock_t lock;struct ib_vl_weight_elem table[VL_ARB_TABLE_SIZE ]; };
drivers/staging/rdma/hfi1/qsfp.h +1 -0
@@ -215,6 +215,7 @@ struct qsfp_data {struct hfi1_pportdata *ppd;struct work_struct qsfp_work;u8 cache[QSFP_MAX_NUM_PAGES *128 ]; +/* protect qsfp data */ spinlock_t qsfp_lock;u8 check_interrupt_flags;u8 reset_needed;
drivers/staging/rdma/hfi1/sdma.h +1 -0
@@ -412,6 +412,7 @@ struct sdma_engine {u32 progress_check_head;/* private: */ struct work_struct flush_worker; +/* protect flush list */ spinlock_t flushlist_lock;/* private: */ struct list_head flushlist;
--
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 17/21 staging/rdma/hfi1: Fix block comments
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Fix block comments with proper formatting to fix checkpatch warnings:
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
--- drivers/staging/rdma/hfi1/chip.c | 87 ++++++++++++++++++++++----------- drivers/staging/rdma/hfi1/chip.h | 12 +++-- drivers/staging/rdma/hfi1/file_ops.c | 6 ++ drivers/staging/rdma/hfi1/firmware.c | 18 +++++-- drivers/staging/rdma/hfi1/hfi.h | 6 ++ drivers/staging/rdma/hfi1/init.c | 12 +++-- drivers/staging/rdma/hfi1/mad.c | 62 +++++++++++++++--------- drivers/staging/rdma/hfi1/mad.h | 6 ++ drivers/staging/rdma/hfi1/pcie.c | 6 ++ drivers/staging/rdma/hfi1/pio.c | 12 +++-- drivers/staging/rdma/hfi1/pio_copy.c | 30 ++++++++--- drivers/staging/rdma/hfi1/platform.h | 8 ++- drivers/staging/rdma/hfi1/sdma.c | 3 + drivers/staging/rdma/hfi1/user_sdma.c | 42 +++++++++++----- 14 files changed, 203 insertions(+), 107 deletions(-)
drivers/staging/rdma/hfi1/chip.c +58 -29
@@ -6392,14 +6392,18 @@ static void dc_shutdown(struct hfi1_devdata *dd)spin_unlock_irqrestore (&dd->dc8051_lock, flags);/* Shutdown the LCB */ lcb_shutdown (dd,1 ); -/* Going to OFFLINE would have causes the 8051 to put the +/* +* Going to OFFLINE would have causes the 8051 to put the * SerDes into reset already. Just need to shut down the 8051, -* itself. */ +* itself. +*/ write_csr (dd,DC_DC8051_CFG_RST ,0x1 ); } -/* Calling this after the DC has been brought out of reset should not -* do any damage. */ +/* +* Calling this after the DC has been brought out of reset should not +* do any damage. +*/ static void dc_start (struct hfi1_devdata *dd) {unsigned long flags;
@@ -6525,8 +6529,10 @@ void handle_sma_message(struct work_struct *work)u64 msg;int ret; -/* msg is bytes 1-4 of the 40-bit idle message - the command code -is stripped off */ +/* +* msg is bytes 1-4 of the 40-bit idle message - the command code +* is stripped off +*/ ret =read_idle_sma (dd, &msg);if (ret)return ;
@@ -6815,8 +6821,10 @@ void handle_link_up(struct work_struct *work) } } -/* Several pieces of LNI information were cached for SMA in ppd. -* Reset these on link down */ +/* +* Several pieces of LNI information were cached for SMA in ppd. +* Reset these on link down +*/ static void reset_neighbor_info (struct hfi1_pportdata *ppd) { ppd->neighbor_guid =0 ;
@@ -6862,8 +6870,10 @@ void handle_link_down(struct work_struct *work)/* disable the port */ clear_rcvctrl (ppd->dd,RCV_CTRL_RCV_PORT_ENABLE_SMASK ); -/* If there is no cable attached, turn the DC off. Otherwise, -* start the link bring up. */ +/* +* If there is no cable attached, turn the DC off. Otherwise, +* start the link bring up. +*/ if (!qsfp_mod_present (ppd)) {dc_shutdown (ppd->dd); }else {
@@ -7564,8 +7574,10 @@ static void handle_8051_interrupt(struct hfi1_devdata *dd, u32 unused, u64 reg) }if (queue_link_down) { -/* if the link is already going down or disabled, do not -* queue another */ +/* +* if the link is already going down or disabled, do not +* queue another +*/ if ((ppd->host_link_state & (HLS_GOING_OFFLINE |HLS_LINK_COOLDOWN )) || ppd->link_enabled ==0 ) {
@@ -7712,8 +7724,10 @@ static void handle_dcc_err(struct hfi1_devdata *dd, u32 unused, u64 reg)/* set status bit */ dd->err_info_rcvport.status_and_code |=OPA_EI_STATUS_SMASK ; -/* save first 2 flits in the packet that caused -* the error */ +/* +* save first 2 flits in the packet that caused +* the error +*/ dd->err_info_rcvport.packet_flit1 = hdr0; dd->err_info_rcvport.packet_flit2 = hdr1; }
@@ -7913,8 +7927,10 @@ static void is_reserved_int(struct hfi1_devdata *dd, unsigned int source) }static const struct is_table is_table[] = { -/* start end -name func interrupt func */ +/* +* start end +* name func interrupt func +*/ {IS_GENERAL_ERR_START ,IS_GENERAL_ERR_END , is_misc_err_name, is_misc_err_int }, {IS_SDMAENG_ERR_START ,IS_SDMAENG_ERR_END ,
@@ -10763,8 +10779,10 @@ int set_buffer_control(struct hfi1_pportdata *ppd,*/ memset (changing,0 ,sizeof (changing));memset (lowering_dedicated,0 ,sizeof (lowering_dedicated)); -/* NOTE: Assumes that the individual VL bits are adjacent and in -increasing order */ +/* +* NOTE: Assumes that the individual VL bits are adjacent and in +* increasing order +*/ stat_mask =SEND_CM_CREDIT_USED_STATUS_VL0_RETURN_CREDIT_STATUS_SMASK ; changing_mask =0 ;
@@ -11129,8 +11147,10 @@ static void adjust_rcv_timeout(struct hfi1_ctxtdata *rcd, u32 npkts) } rcd->rcvavail_timeout = timeout; -/* timeout cannot be larger than rcv_intr_timeout_csr which has already -been verified to be in range */ +/* +* timeout cannot be larger than rcv_intr_timeout_csr which has already +* been verified to be in range +*/ write_kctxt_csr (dd, rcd->ctxt,RCV_AVAIL_TIME_OUT , (u64 )timeout <<RCV_AVAIL_TIME_OUT_TIME_OUT_RELOAD_SHIFT ); }
@@ -11323,8 +11343,10 @@ void hfi1_rcvctrl(struct hfi1_devdata *dd, unsigned int op, int ctxt)if (op &HFI1_RCVCTRL_TIDFLOW_DIS ) rcvctrl &= ~RCV_CTXT_CTRL_TID_FLOW_ENABLE_SMASK ;if (op &HFI1_RCVCTRL_ONE_PKT_EGR_ENB ) { -/* In one-packet-per-eager mode, the size comes from -the RcvArray entry. */ +/* +* In one-packet-per-eager mode, the size comes from +* the RcvArray entry. +*/ rcvctrl &= ~RCV_CTXT_CTRL_EGR_BUF_SIZE_SMASK ; rcvctrl |=RCV_CTXT_CTRL_ONE_PACKET_PER_EGR_BUFFER_SMASK ; }
@@ -12524,7 +12546,8 @@ static int request_msix_irqs(struct hfi1_devdata *dd) me->type =IRQ_RCVCTXT ; }else {/* not in our expected range - complain, then -ignore it */ +* ignore it +*/ dd_dev_err (dd,"Unexpected extra MSI-X interrupt %d\n" , i);continue ;
@@ -12830,8 +12853,10 @@ static void write_uninitialized_csrs_and_memories(struct hfi1_devdata *dd)/* PIO Send buffers */ /* SDMA Send buffers */ -/* These are not normally read, and (presently) have no method -to be read, so are not pre-initialized */ +/* +* These are not normally read, and (presently) have no method +* to be read, so are not pre-initialized +*/ /* RcvHdrAddr */ /* RcvHdrTailAddr */
@@ -13026,8 +13051,10 @@ static void reset_misc_csrs(struct hfi1_devdata *dd)write_csr (dd,MISC_CFG_RSA_SIGNATURE + (8 * i),0 );write_csr (dd,MISC_CFG_RSA_MODULUS + (8 * i),0 ); } -/* MISC_CFG_SHA_PRELOAD leave alone - always reads 0 and can -only be written 128-byte chunks */ +/* +* MISC_CFG_SHA_PRELOAD leave alone - always reads 0 and can +* only be written 128-byte chunks +*/ /* init RSA engine to clear lingering errors */ write_csr (dd,MISC_CFG_RSA_CMD ,1 );write_csr (dd,MISC_CFG_RSA_MU ,0 );
@@ -14045,8 +14072,10 @@ struct hfi1_devdata *hfi1_init_dd(struct pci_dev *pdev, dd->minrev = (dd->revision >>CCE_REVISION_CHIP_REV_MINOR_SHIFT ) &CCE_REVISION_CHIP_REV_MINOR_MASK ; -/* obtain the hardware ID - NOT related to unit, which is a -software enumeration */ +/* +* obtain the hardware ID - NOT related to unit, which is a +* software enumeration +*/ reg =read_csr (dd,CCE_REVISION2 ); dd->hfi1_id = (reg >>CCE_REVISION2_HFI_ID_SHIFT ) &CCE_REVISION2_HFI_ID_MASK ;
drivers/staging/rdma/hfi1/chip.h +8 -4
@@ -79,8 +79,10 @@#define PIO_CMASK 0x7ff/* counter mask for free and fill counters */ #define MAX_EAGER_ENTRIES 2048/* max receive eager entries */ #define MAX_TID_PAIR_ENTRIES 1024/* max receive expected pairs */ -/* Virtual? Allocation Unit, defined as AU = 8*2^vAU, 64 bytes, AU is fixed -at 64 bytes for all generation one devices */ +/* +* Virtual? Allocation Unit, defined as AU = 8*2^vAU, 64 bytes, AU is fixed +* at 64 bytes for all generation one devices +*/ #define CM_VAU 3/* HFI link credit count, AKA receive buffer depth (RBUF_DEPTH) */ #define CM_GLOBAL_CREDITS 0x940
@@ -518,8 +520,10 @@ enum {#define LCB_CRC_48B 0x2/* 48b CRC */ #define LCB_CRC_12B_16B_PER_LANE 0x3/* 12b-16b per lane CRC */ -/* the following enum is (almost) a copy/paste of the definition -* in the OPA spec, section 20.2.2.6.8 (PortInfo) */ +/* +* the following enum is (almost) a copy/paste of the definition +* in the OPA spec, section 20.2.2.6.8 (PortInfo) +*/ enum {PORT_LTP_CRC_MODE_NONE =0 ,PORT_LTP_CRC_MODE_14 =1 ,/* 14-bit LTP CRC mode (optional) */
drivers/staging/rdma/hfi1/file_ops.c +4 -2
@@ -388,8 +388,10 @@ static ssize_t hfi1_file_write(struct file *fp, const char __user *data,break ; }if (dd->flags &HFI1_FORCED_FREEZE ) { -/* Don't allow context reset if we are into -* forced freeze */ +/* +* Don't allow context reset if we are into +* forced freeze +*/ ret = -ENODEV ;break ; }
drivers/staging/rdma/hfi1/firmware.c +12 -6
@@ -1294,8 +1294,10 @@ static int load_pcie_serdes_firmware(struct hfi1_devdata *dd,/* step 3: enable XDMEM access */ sbus_request (dd, ra,0x01 ,WRITE_SBUS_RECEIVER ,0x00000d40 );/* step 4: load firmware into SBus Master XDMEM */ -/* NOTE: the dmem address, write_en, and wdata are all pre-packed, -we only need to pick up the bytes and write them */ +/* +* NOTE: the dmem address, write_en, and wdata are all pre-packed, +* we only need to pick up the bytes and write them +*/ for (i =0 ; i < fdet->firmware_len; i +=4 ) {sbus_request (dd, ra,0x04 ,WRITE_SBUS_RECEIVER , *(u32 *)&fdet->firmware_ptr[i]);
@@ -1305,8 +1307,10 @@ static int load_pcie_serdes_firmware(struct hfi1_devdata *dd,/* step 6: allow SBus Spico to run */ sbus_request (dd, ra,0x05 ,WRITE_SBUS_RECEIVER ,0x00000000 ); -/* steps 7-11: run RSA, if it succeeds, firmware is available to -be swapped */ +/* +* steps 7-11: run RSA, if it succeeds, firmware is available to +* be swapped +*/ return run_rsa (dd,"PCIe serdes" , fdet->signature); }
@@ -1744,8 +1748,10 @@ int get_platform_config_field(struct hfi1_devdata *dd, src_ptr = (u32 *)((u8 *)src_ptr + seek); -/* We expect the field to be byte aligned and whole byte -* lengths if we are here */ +/* +* We expect the field to be byte aligned and whole byte +* lengths if we are here +*/ memcpy (data, src_ptr, wlen);return 0 ; }
drivers/staging/rdma/hfi1/hfi.h +4 -2
@@ -718,8 +718,10 @@ struct hfi1_pportdata {/* CA's max number of 64 entry units in the congestion control table */ u8 cc_max_table_entries; -/* begin congestion log related entries -* cc_log_lock protects all congestion log related data */ +/* +* begin congestion log related entries +* cc_log_lock protects all congestion log related data +*/ spinlock_t cc_log_lock____cacheline_aligned_in_smp ;u8 threshold_cong_event_map[OPA_MAX_SLS /8 ];u16 threshold_event_counter;
drivers/staging/rdma/hfi1/init.c +8 -4
@@ -790,8 +790,10 @@ done:for (pidx =0 ; pidx < dd->num_pports; ++pidx) { ppd = dd->pport + pidx; -/* start the serdes - must be after interrupts are -enabled so we are notified when the link goes up */ +/* +* start the serdes - must be after interrupts are +* enabled so we are notified when the link goes up +*/ lastfail =bringup_serdes (ppd);if (lastfail) dd_dev_info(dd,
@@ -1188,8 +1190,10 @@ static int __init hfi1_mod_init(void) user_credit_return_threshold =100 ;compute_krcvqs (); -/* sanitize receive interrupt count, time must wait until after -the hardware type is known */ +/* +* sanitize receive interrupt count, time must wait until after +* the hardware type is known +*/ if (rcv_intr_count >RCV_HDR_HEAD_COUNTER_MASK ) rcv_intr_count =RCV_HDR_HEAD_COUNTER_MASK ;/* reject invalid combinations */
drivers/staging/rdma/hfi1/mad.c +39 -23
123 lines not on this page · raw message
drivers/staging/rdma/hfi1/mad.h +4 -2
@@ -51,8 +51,10 @@#define _HFI1_MAD_H#include <rdma/ib_pma.h> -#define USE_PI_LED_ENABLE 1/* use led enabled bit in struct -* opa_port_states, if available */ +#define USE_PI_LED_ENABLE 1/* +* use led enabled bit in struct +* opa_port_states, if available +*/ #include <rdma/opa_smi.h> #include <rdma/opa_port_info.h> #ifndef PI_LED_ENABLE_SUP
drivers/staging/rdma/hfi1/pcie.c +4 -2
@@ -284,9 +284,11 @@ static void msix_setup(struct hfi1_devdata *dd, int pos, u32 *msixcnt,struct msix_entry *msix_entry;int i; -/* We can't pass hfi1_msix_entry array to msix_setup +/* +* We can't pass hfi1_msix_entry array to msix_setup * so use a dummy msix_entry array and copy the allocated -* irq back to the hfi1_msix_entry array. */ +* irq back to the hfi1_msix_entry array. +*/ msix_entry =kmalloc_array (nvec,sizeof (*msix_entry),GFP_KERNEL );if (!msix_entry) { ret = -ENOMEM ;
drivers/staging/rdma/hfi1/pio.c +8 -4
@@ -177,8 +177,10 @@ static struct mem_pool_config sc_mem_pool_config[NUM_SC_POOLS] = {/* memory pool information, used when calculating final sizes */ struct mem_pool_info { -int centipercent;/* 100th of 1% of memory to use, -1 if blocks -already set */ +int centipercent;/* +* 100th of 1% of memory to use, -1 if blocks +* already set +*/ int count;/* count of contexts in the pool */ int blocks;/* block size of the pool */ int size;/* context size, in blocks */
@@ -1429,8 +1431,10 @@ retry: next = head +1 ;if (next >= sc->sr_size) next =0 ; -/* update the head - must be last! - the releaser can look at fields -in pbuf once we move the head */ +/* +* update the head - must be last! - the releaser can look at fields +* in pbuf once we move the head +*/ smp_wmb (); sc->sr_head = next;spin_unlock_irqrestore (&sc->alloc_lock, flags);
drivers/staging/rdma/hfi1/pio_copy.c +20 -10
@@ -86,8 +86,10 @@ void pio_copy(struct hfi1_devdata *dd, struct pio_buf *pbuf, u64 pbc, dend = dest + ((count >>1 ) *sizeof (u64));if (dend < send) { -/* all QWORD data is within the SOP block, does *not* -reach the end of the SOP block */ +/* +* all QWORD data is within the SOP block, does *not* +* reach the end of the SOP block +*/ while (dest < dend) {writeq (*(u64 *)from, dest);
@@ -152,8 +154,10 @@ void pio_copy(struct hfi1_devdata *dd, struct pio_buf *pbuf, u64 pbc,writeq (val.val64, dest); dest +=sizeof (u64); } -/* fill in rest of block, no need to check pbuf->end -as we only wrap on a block boundary */ +/* +* fill in rest of block, no need to check pbuf->end +* as we only wrap on a block boundary +*/ while (((unsigned long )dest &PIO_BLOCK_MASK ) !=0 ) {writeq (0 , dest); dest +=sizeof (u64);
@@ -466,8 +470,10 @@ void seg_pio_copy_start(struct pio_buf *pbuf, u64 pbc, dend = dest + ((nbytes >>3 ) *sizeof (u64));if (dend < send) { -/* all QWORD data is within the SOP block, does *not* -reach the end of the SOP block */ +/* +* all QWORD data is within the SOP block, does *not* +* reach the end of the SOP block +*/ while (dest < dend) {writeq (*(u64 *)from, dest);
@@ -562,8 +568,10 @@ static void mid_copy_mix(struct pio_buf *pbuf, const void *from, size_t nbytes)void __iomem *send;/* SOP end */ void __iomem *xend; -/* calculate the end of data or end of block, whichever -comes first */ +/* +* calculate the end of data or end of block, whichever +* comes first +*/ send = pbuf->start +PIO_BLOCK_SIZE ; xend = send < dend ? send : dend;
@@ -656,8 +664,10 @@ static void mid_copy_straight(struct pio_buf *pbuf,void __iomem *send;/* SOP end */ void __iomem *xend; -/* calculate the end of data or end of block, whichever -comes first */ +/* +* calculate the end of data or end of block, whichever +* comes first +*/ send = pbuf->start +PIO_BLOCK_SIZE ; xend = send < dend ? send : dend;
drivers/staging/rdma/hfi1/platform.h +4 -4
@@ -186,9 +186,9 @@ static const u32 platform_config_table_limits[PLATFORM_CONFIG_TABLE_MAX] = {*/ /* -*===================================================== +* ===================================================== * System table encodings -*==================================================== +* ===================================================== */ #define PLATFORM_CONFIG_MAGIC_NUM 0x3d4f5041#define PLATFORM_CONFIG_MAGIC_NUMBER_LEN 4
@@ -208,9 +208,9 @@ enum platform_config_qsfp_power_class_encoding { };/* -*===================================================== +* ==================================================== * Port table encodings -*==================================================== +* ==================================================== */ enum platform_config_port_type_encoding {PORT_TYPE_UNKNOWN ,
drivers/staging/rdma/hfi1/sdma.c +2 -1
@@ -2220,7 +2220,8 @@ static void __sdma_process_event(struct sdma_engine *sde,* of link up, then we need to start up. * This can happen when hw down is requested while * bringing the link up with traffic active on -* 7220, e.g. */ +* 7220, e.g. +*/ ss->go_s99_running =1 ;/* fall through and start dma engine */ case sdma_event_e10_go_hw_start:
drivers/staging/rdma/hfi1/user_sdma.c +28 -14
85 lines not on this page · raw message
--
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 18/21 staging/rdma/hfi1: Fix code alignment
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Fix code alignment to fix checkpatch check:
CHECK: Alignment should match open parenthesis
--- drivers/staging/rdma/hfi1/chip.c | 921 ++++++++++++------------ drivers/staging/rdma/hfi1/debugfs.c | 34 - drivers/staging/rdma/hfi1/driver.c | 32 - drivers/staging/rdma/hfi1/eprom.c | 39 - drivers/staging/rdma/hfi1/file_ops.c | 8 drivers/staging/rdma/hfi1/firmware.c | 124 ++- drivers/staging/rdma/hfi1/hfi.h | 5 drivers/staging/rdma/hfi1/init.c | 24 - drivers/staging/rdma/hfi1/intr.c | 12 drivers/staging/rdma/hfi1/mad.c | 141 ++-- drivers/staging/rdma/hfi1/pcie.c | 99 +-- drivers/staging/rdma/hfi1/pio.c | 71 +- drivers/staging/rdma/hfi1/pio.h | 4 drivers/staging/rdma/hfi1/pio_copy.c | 14 drivers/staging/rdma/hfi1/qsfp.c | 2 drivers/staging/rdma/hfi1/rc.c | 4 drivers/staging/rdma/hfi1/ruc.c | 14 drivers/staging/rdma/hfi1/sdma.c | 178 ++--- drivers/staging/rdma/hfi1/sysfs.c | 36 - drivers/staging/rdma/hfi1/trace.c | 47 + drivers/staging/rdma/hfi1/trace.h | 1280 ++++++++++++++++----------------- drivers/staging/rdma/hfi1/twsi.c | 2 drivers/staging/rdma/hfi1/uc.c | 2 drivers/staging/rdma/hfi1/ud.c | 7 drivers/staging/rdma/hfi1/user_sdma.c | 2 drivers/staging/rdma/hfi1/verbs.c | 3 26 files changed, 1508 insertions(+), 1597 deletions(-)
drivers/staging/rdma/hfi1/chip.c +449 -472
@@ -944,7 +944,7 @@ static struct flag_table dc8051_err_flags[] = {FLAG_ENTRY0 ("IRAM_MBE" ,D8E (IRAM_MBE )),FLAG_ENTRY0 ("IRAM_SBE" ,D8E (IRAM_SBE )),FLAG_ENTRY0 ("UNMATCHED_SECURE_MSG_ACROSS_BCC_LANES" , -D8E (UNMATCHED_SECURE_MSG_ACROSS_BCC_LANES )), +D8E (UNMATCHED_SECURE_MSG_ACROSS_BCC_LANES )), FLAG_ENTRY0("INVALID_CSR_ADDR", D8E(INVALID_CSR_ADDR)), };
@@ -958,7 +958,7 @@ static struct flag_table dc8051_info_err_flags[] = {FLAG_ENTRY0 ("Unknown frame received" ,UNKNOWN_FRAME ),FLAG_ENTRY0 ("Target BER not met" ,TARGET_BER_NOT_MET ),FLAG_ENTRY0 ("Serdes internal loopback failure" , -FAILED_SERDES_INTERNAL_LOOPBACK ), +FAILED_SERDES_INTERNAL_LOOPBACK ),FLAG_ENTRY0 ("Failed SerDes init" ,FAILED_SERDES_INIT ),FLAG_ENTRY0 ("Failed LNI(Polling)" ,FAILED_LNI_POLLING ), FLAG_ENTRY0("Failed LNI(Debounce)", FAILED_LNI_DEBOUNCE),
@@ -1147,11 +1147,8 @@ struct cntr_entry {/* * accessor for stat element, context either dd or ppd */ -u64 (*rw_cntr)(const struct cntr_entry *, -void *context, -int vl, -int mode, -u64 data); +u64 (*rw_cntr)(const struct cntr_entry *,void *context,int vl, +int mode,u64 data); };#define C_RCV_HDR_OVF_FIRST C_RCV_HDR_OVF_0
@@ -1300,7 +1297,7 @@ static inline u64 read_write_csr(const struct hfi1_devdata *dd, u32 csr,/* Dev Access */ static u64 dev_access_u32_csr (const struct cntr_entry *entry, -void *context,int vl,int mode,u64 data) +void *context,int vl,int mode,u64 data) {struct hfi1_devdata *dd = context;u64 csr = entry->csr;
@@ -1358,7 +1355,7 @@ static u64 access_sde_progress_int_cnt(const struct cntr_entry *entry, }static u64 dev_access_u64_csr (const struct cntr_entry *entry,void *context, -int vl,int mode,u64 data) +int vl,int mode,u64 data) {struct hfi1_devdata *dd = context;
@@ -1379,7 +1376,7 @@ static u64 dev_access_u64_csr(const struct cntr_entry *entry, void *context, }static u64 dc_access_lcb_cntr (const struct cntr_entry *entry,void *context, -int vl,int mode,u64 data) +int vl,int mode,u64 data) {struct hfi1_devdata *dd = context;u32 csr = entry->csr;
@@ -1403,7 +1400,7 @@ static u64 dc_access_lcb_cntr(const struct cntr_entry *entry, void *context,/* Port Access */ static u64 port_access_u32_csr (const struct cntr_entry *entry,void *context, -int vl,int mode,u64 data) +int vl,int mode,u64 data) {struct hfi1_pportdata *ppd = context;
@@ -1413,7 +1410,7 @@ static u64 port_access_u32_csr(const struct cntr_entry *entry, void *context, }static u64 port_access_u64_csr (const struct cntr_entry *entry, -void *context,int vl,int mode,u64 data) +void *context,int vl,int mode,u64 data) {struct hfi1_pportdata *ppd = context;u64 val;
@@ -1453,7 +1450,7 @@ static inline u64 read_write_sw(struct hfi1_devdata *dd, u64 *cntr, int mode, }static u64 access_sw_link_dn_cnt (const struct cntr_entry *entry,void *context, -int vl,int mode,u64 data) +int vl,int mode,u64 data) {struct hfi1_pportdata *ppd = context;
@@ -1463,7 +1460,7 @@ static u64 access_sw_link_dn_cnt(const struct cntr_entry *entry, void *context, }static u64 access_sw_link_up_cnt (const struct cntr_entry *entry,void *context, -int vl,int mode,u64 data) +int vl,int mode,u64 data) {struct hfi1_pportdata *ppd = context;
@@ -1484,7 +1481,7 @@ static u64 access_sw_unknown_frame_cnt(const struct cntr_entry *entry, }static u64 access_sw_xmit_discards (const struct cntr_entry *entry, -void *context,int vl,int mode,u64 data) +void *context,int vl,int mode,u64 data) {struct hfi1_pportdata *ppd = (struct hfi1_pportdata *)context;u64 zero =0 ;
@@ -1501,7 +1498,8 @@ static u64 access_sw_xmit_discards(const struct cntr_entry *entry, }static u64 access_xmit_constraint_errs (const struct cntr_entry *entry, -void *context,int vl,int mode,u64 data) +void *context,int vl,int mode, +u64 data) {struct hfi1_pportdata *ppd = context;
@@ -1513,7 +1511,7 @@ static u64 access_xmit_constraint_errs(const struct cntr_entry *entry, }static u64 access_rcv_constraint_errs (const struct cntr_entry *entry, -void *context,int vl,int mode,u64 data) +void *context,int vl,int mode,u64 data) {struct hfi1_pportdata *ppd = context;
@@ -1569,7 +1567,7 @@ static u64 access_sw_cpu_intr(const struct cntr_entry *entry, }static u64 access_sw_cpu_rcv_limit (const struct cntr_entry *entry, -void *context,int vl,int mode,u64 data) +void *context,int vl,int mode,u64 data) {struct hfi1_devdata *dd = context;
@@ -1610,7 +1608,7 @@ static u64 access_sw_kmem_wait(const struct cntr_entry *entry, }static u64 access_sw_send_schedule (const struct cntr_entry *entry, -void *context,int vl,int mode,u64 data) +void *context,int vl,int mode,u64 data) {struct hfi1_devdata *dd = (struct hfi1_devdata *)context;
@@ -4965,28 +4963,28 @@ static struct cntr_entry port_cntrs[PORT_CNTR_LAST] = { [C_TX_WORDS] = TXE64_PORT_CNTR_ELEM(TxWords, SEND_DWORD_CNT, CNTR_NORMAL), [C_TX_WAIT] = TXE64_PORT_CNTR_ELEM(TxWait, SEND_WAIT_CNT, CNTR_SYNTH), [C_TX_FLIT_VL ] =TXE64_PORT_CNTR_ELEM (TxFlitVL,SEND_DATA_VL0_CNT , - CNTR_SYNTH | CNTR_VL), + CNTR_SYNTH | CNTR_VL), [C_TX_PKT_VL ] =TXE64_PORT_CNTR_ELEM (TxPktVL,SEND_DATA_PKT_VL0_CNT , - CNTR_SYNTH | CNTR_VL), + CNTR_SYNTH | CNTR_VL), [C_TX_WAIT_VL ] =TXE64_PORT_CNTR_ELEM (TxWaitVL,SEND_WAIT_VL0_CNT , - CNTR_SYNTH | CNTR_VL), + CNTR_SYNTH | CNTR_VL), [C_RX_PKT] = RXE64_PORT_CNTR_ELEM(RxPkt, RCV_DATA_PKT_CNT, CNTR_NORMAL), [C_RX_WORDS] = RXE64_PORT_CNTR_ELEM(RxWords, RCV_DWORD_CNT, CNTR_NORMAL), [C_SW_LINK_DOWN ] =CNTR_ELEM ("SwLinkDown" ,0 ,0 ,CNTR_SYNTH |CNTR_32BIT , - access_sw_link_dn_cnt), + access_sw_link_dn_cnt), [C_SW_LINK_UP ] =CNTR_ELEM ("SwLinkUp" ,0 ,0 ,CNTR_SYNTH |CNTR_32BIT , - access_sw_link_up_cnt), + access_sw_link_up_cnt), [C_SW_UNKNOWN_FRAME ] =CNTR_ELEM ("UnknownFrame" ,0 ,0 ,CNTR_NORMAL , access_sw_unknown_frame_cnt), [C_SW_XMIT_DSCD ] =CNTR_ELEM ("XmitDscd" ,0 ,0 ,CNTR_SYNTH |CNTR_32BIT , - access_sw_xmit_discards), + access_sw_xmit_discards), [C_SW_XMIT_DSCD_VL ] =CNTR_ELEM ("XmitDscdVl" ,0 ,0 , -CNTR_SYNTH |CNTR_32BIT |CNTR_VL , - access_sw_xmit_discards), +CNTR_SYNTH |CNTR_32BIT |CNTR_VL , + access_sw_xmit_discards), [C_SW_XMIT_CSTR_ERR ] =CNTR_ELEM ("XmitCstrErr" ,0 ,0 ,CNTR_SYNTH , - access_xmit_constraint_errs), + access_xmit_constraint_errs), [C_SW_RCV_CSTR_ERR ] =CNTR_ELEM ("RcvCstrErr" ,0 ,0 ,CNTR_SYNTH , - access_rcv_constraint_errs), + access_rcv_constraint_errs), [C_SW_IBP_LOOP_PKTS] = SW_IBP_CNTR(LoopPkts, loop_pkts), [C_SW_IBP_RC_RESENDS] = SW_IBP_CNTR(RcResend, rc_resends), [C_SW_IBP_RNR_NAKS] = SW_IBP_CNTR(RnrNak, rnr_naks),
@@ -5002,9 +5000,9 @@ static struct cntr_entry port_cntrs[PORT_CNTR_LAST] = { [C_SW_CPU_RC_ACKS] = CNTR_ELEM("RcAcks", 0, 0, CNTR_NORMAL, access_sw_cpu_rc_acks), [C_SW_CPU_RC_QACKS ] =CNTR_ELEM ("RcQacks" ,0 ,0 ,CNTR_NORMAL , - access_sw_cpu_rc_qacks), + access_sw_cpu_rc_qacks), [C_SW_CPU_RC_DELAYED_COMP ] =CNTR_ELEM ("RcDelayComp" ,0 ,0 ,CNTR_NORMAL , - access_sw_cpu_rc_delayed_comp), + access_sw_cpu_rc_delayed_comp), [OVR_LBL(0)] = OVR_ELM(0), [OVR_LBL(1)] = OVR_ELM(1), [OVR_LBL(2)] = OVR_ELM(2), [OVR_LBL(3)] = OVR_ELM(3), [OVR_LBL(4)] = OVR_ELM(4), [OVR_LBL(5)] = OVR_ELM(5),
@@ -5153,7 +5151,7 @@ done:* the buffer. End in '*' if the buffer is too short. */ static char *flag_string (char *buf,int buf_len,u64 flags, -struct flag_table *table,int table_size) +struct flag_table *table,int table_size) {char extra[32 ];char *p = buf;
@@ -5214,10 +5212,8 @@ static char *is_misc_err_name(char *buf, size_t bsize, unsigned int source)if (source <ARRAY_SIZE (cce_misc_names))strncpy (buf, cce_misc_names[source], bsize);else -snprintf (buf, - bsize, -"Reserved%u" , - source +IS_GENERAL_ERR_START ); +snprintf (buf, bsize,"Reserved%u" , + source +IS_GENERAL_ERR_START );return buf; }
@@ -5341,51 +5337,56 @@ static char *is_reserved_name(char *buf, size_t bsize, unsigned int source)static char *cce_err_status_string (char *buf,int buf_len,u64 flags) {return flag_string (buf, buf_len, flags, - cce_err_status_flags,ARRAY_SIZE (cce_err_status_flags)); + cce_err_status_flags, +ARRAY_SIZE (cce_err_status_flags)); }static char *rxe_err_status_string (char *buf,int buf_len,u64 flags) {return flag_string (buf, buf_len, flags, - rxe_err_status_flags,ARRAY_SIZE (rxe_err_status_flags)); + rxe_err_status_flags, +ARRAY_SIZE (rxe_err_status_flags)); }static char *misc_err_status_string (char *buf,int buf_len,u64 flags) {return flag_string (buf, buf_len, flags, misc_err_status_flags, -ARRAY_SIZE (misc_err_status_flags)); +ARRAY_SIZE (misc_err_status_flags)); }static char *pio_err_status_string (char *buf,int buf_len,u64 flags) {return flag_string (buf, buf_len, flags, - pio_err_status_flags,ARRAY_SIZE (pio_err_status_flags)); + pio_err_status_flags, +ARRAY_SIZE (pio_err_status_flags)); }static char *sdma_err_status_string (char *buf,int buf_len,u64 flags) {return flag_string (buf, buf_len, flags, - sdma_err_status_flags, -ARRAY_SIZE (sdma_err_status_flags)); + sdma_err_status_flags, +ARRAY_SIZE (sdma_err_status_flags)); }static char *egress_err_status_string (char *buf,int buf_len,u64 flags) {return flag_string (buf, buf_len, flags, - egress_err_status_flags,ARRAY_SIZE (egress_err_status_flags)); + egress_err_status_flags, +ARRAY_SIZE (egress_err_status_flags)); }static char *egress_err_info_string (char *buf,int buf_len,u64 flags) {return flag_string (buf, buf_len, flags, - egress_err_info_flags,ARRAY_SIZE (egress_err_info_flags)); + egress_err_info_flags, +ARRAY_SIZE (egress_err_info_flags)); }static char *send_err_status_string (char *buf,int buf_len,u64 flags) {return flag_string (buf, buf_len, flags, - send_err_status_flags, -ARRAY_SIZE (send_err_status_flags)); + send_err_status_flags, +ARRAY_SIZE (send_err_status_flags)); }static void handle_cce_err (struct hfi1_devdata *dd,u32 unused,u64 reg)
@@ -5398,7 +5399,7 @@ static void handle_cce_err(struct hfi1_devdata *dd, u32 unused, u64 reg)* report or record it. */ dd_dev_info (dd,"CCE Error: %s\n" , -cce_err_status_string (buf,sizeof (buf), reg)); +cce_err_status_string (buf,sizeof (buf), reg));if ((reg &CCE_ERR_STATUS_CCE_CLI2_ASYNC_FIFO_PARITY_ERR_SMASK ) &&is_ax (dd) && (dd->icode !=ICODE_FUNCTIONAL_SIMULATOR )) {
@@ -5428,11 +5429,11 @@ static void update_rcverr_timer(unsigned long opaque)u32 cur_ovfl_cnt =read_dev_cntr (dd,C_RCV_OVF ,CNTR_INVALID_VL );if (dd->rcv_ovfl_cnt < cur_ovfl_cnt && - ppd->port_error_action &OPA_PI_MASK_EX_BUFFER_OVERRUN ) { + ppd->port_error_action &OPA_PI_MASK_EX_BUFFER_OVERRUN ) {dd_dev_info (dd,"%s: PortErrorAction bounce\n" , __func__); -set_link_down_reason (ppd, -OPA_LINKDOWN_REASON_EXCESSIVE_BUFFER_OVERRUN ,0 , -OPA_LINKDOWN_REASON_EXCESSIVE_BUFFER_OVERRUN ); +set_link_down_reason ( + ppd,OPA_LINKDOWN_REASON_EXCESSIVE_BUFFER_OVERRUN ,0 , +OPA_LINKDOWN_REASON_EXCESSIVE_BUFFER_OVERRUN );queue_work (ppd->hfi1_wq, &ppd->link_bounce_work); } dd->rcv_ovfl_cnt = (u32 )cur_ovfl_cnt;
@@ -5461,7 +5462,7 @@ static void handle_rxe_err(struct hfi1_devdata *dd, u32 unused, u64 reg)int i =0 ;dd_dev_info (dd,"Receive Error: %s\n" , -rxe_err_status_string (buf,sizeof (buf), reg)); +rxe_err_status_string (buf,sizeof (buf), reg));if (reg &ALL_RXE_FREEZE_ERR ) {int flags =0 ;
@@ -5488,7 +5489,7 @@ static void handle_misc_err(struct hfi1_devdata *dd, u32 unused, u64 reg)int i =0 ;dd_dev_info (dd,"Misc Error: %s" , -misc_err_status_string (buf,sizeof (buf), reg)); +misc_err_status_string (buf,sizeof (buf), reg));for (i =0 ; i <NUM_MISC_ERR_STATUS_COUNTERS ; i++) {if (reg & (1ull << i))incr_cntr64 (&dd->misc_err_status_cnt[i]);
@@ -5501,7 +5502,7 @@ static void handle_pio_err(struct hfi1_devdata *dd, u32 unused, u64 reg)int i =0 ;dd_dev_info (dd,"PIO Error: %s\n" , -pio_err_status_string (buf,sizeof (buf), reg)); +pio_err_status_string (buf,sizeof (buf), reg));if (reg &ALL_PIO_FREEZE_ERR )start_freeze_handling (dd->pport,0 );
@@ -5518,7 +5519,7 @@ static void handle_sdma_err(struct hfi1_devdata *dd, u32 unused, u64 reg)int i =0 ;dd_dev_info (dd,"SDMA Error: %s\n" , -sdma_err_status_string (buf,sizeof (buf), reg)); +sdma_err_status_string (buf,sizeof (buf), reg));if (reg &ALL_SDMA_FREEZE_ERR )start_freeze_handling (dd->pport,0 );
@@ -5560,8 +5561,8 @@ static void handle_send_egress_err_info(struct hfi1_devdata *dd,write_csr (dd,SEND_EGRESS_ERR_INFO , info);dd_dev_info (dd, -"Egress Error Info: 0x%llx, %s Egress Error Src 0x%llx\n" , - info,egress_err_info_string (buf,sizeof (buf), info), src); +"Egress Error Info: 0x%llx, %s Egress Error Src 0x%llx\n" , + info,egress_err_info_string (buf,sizeof (buf), info), src);/* Eventually add other counters for each bit */ if (info &PORT_DISCARD_EGRESS_ERRS ) {
@@ -5699,7 +5700,7 @@ static void handle_egress_err(struct hfi1_devdata *dd, u32 unused, u64 reg)if (reg)dd_dev_info (dd,"Egress Error: %s\n" , -egress_err_status_string (buf,sizeof (buf), reg)); +egress_err_status_string (buf,sizeof (buf), reg));for (i =0 ; i <NUM_SEND_EGRESS_ERR_STATUS_COUNTERS ; i++) {if (reg & (1ull << i))
@@ -5713,7 +5714,7 @@ static void handle_txe_err(struct hfi1_devdata *dd, u32 unused, u64 reg)int i =0 ;dd_dev_info (dd,"Send Error: %s\n" , -send_err_status_string (buf,sizeof (buf), reg)); +send_err_status_string (buf,sizeof (buf), reg));for (i =0 ; i <NUM_SEND_ERR_STATUS_COUNTERS ; i++) {if (reg & (1ull << i))
@@ -5759,7 +5760,7 @@ static void interrupt_clear_down(struct hfi1_devdata *dd,u64 mask;dd_dev_err (dd,"Repeating %s bits 0x%llx - masking\n" , - eri->desc, reg); + eri->desc, reg);/* * Read-modify-write so any other masked bits * remain masked.
@@ -5783,14 +5784,15 @@ static void is_misc_err_int(struct hfi1_devdata *dd, unsigned int source)interrupt_clear_down (dd,0 , eri); }else {dd_dev_err (dd,"Unexpected misc interrupt (%u) - reserved\n" , - source); + source); } }static char *send_context_err_status_string (char *buf,int buf_len,u64 flags) {return flag_string (buf, buf_len, flags, - sc_err_status_flags,ARRAY_SIZE (sc_err_status_flags)); + sc_err_status_flags, +ARRAY_SIZE (sc_err_status_flags)); }/*
@@ -5815,15 +5817,15 @@ static void is_sendctxt_err_int(struct hfi1_devdata *dd, sw_index = dd->hw_to_sw[hw_context];if (sw_index >= dd->num_send_contexts) {dd_dev_err (dd, -"out of range sw index %u for send context %u\n" , - sw_index, hw_context); +"out of range sw index %u for send context %u\n" , + sw_index, hw_context);return ; } sci = &dd->send_contexts[sw_index]; sc = sci->sc;if (!sc) {dd_dev_err (dd,"%s: context %u(%u): no sc?\n" , __func__, - sw_index, hw_context); + sw_index, hw_context);return ; }
@@ -5833,7 +5835,8 @@ static void is_sendctxt_err_int(struct hfi1_devdata *dd, status =read_kctxt_csr (dd, hw_context,SEND_CTXT_ERR_STATUS );dd_dev_info (dd,"Send Context %u(%u) Error: %s\n" , sw_index, hw_context, -send_context_err_status_string (flags,sizeof (flags), status)); +send_context_err_status_string (flags,sizeof (flags), + status));if (status &SEND_CTXT_ERR_STATUS_PIO_DISALLOWED_PACKET_ERR_SMASK )handle_send_egress_err_info (dd,sc_to_vl (dd, sw_index));
@@ -5918,8 +5921,8 @@ static void is_various_int(struct hfi1_devdata *dd, unsigned int source)interrupt_clear_down (dd,0 , eri); else dd_dev_info(dd, -"%s: Unimplemented/reserved interrupt %d\n" , - __func__, source); +"%s: Unimplemented/reserved interrupt %d\n" , + __func__, source); }static void handle_qsfp_int (struct hfi1_devdata *dd,u32 src_ctx,u64 reg)
@@ -5931,7 +5934,7 @@ static void handle_qsfp_int(struct hfi1_devdata *dd, u32 src_ctx, u64 reg)if (reg &QSFP_HFI0_MODPRST_N ) {dd_dev_info (dd,"%s: ModPresent triggered QSFP interrupt\n" , - __func__); + __func__);if (!qsfp_mod_present (ppd)) { ppd->driver_link_ready =0 ;
@@ -5949,7 +5952,7 @@ static void handle_qsfp_int(struct hfi1_devdata *dd, u32 src_ctx, u64 reg) ppd->qsfp_info.reset_needed =0 ; ppd->qsfp_info.limiting_active =0 ;spin_unlock_irqrestore (&ppd->qsfp_info.qsfp_lock, - flags); + flags);/* Invert the ModPresent pin now to detect plug-in */ write_csr (dd, dd->hfi1_id ?ASIC_QSFP2_INVERT :ASIC_QSFP1_INVERT , qsfp_int_mgmt);
@@ -5977,7 +5980,7 @@ static void handle_qsfp_int(struct hfi1_devdata *dd, u32 src_ctx, u64 reg) ppd->qsfp_info.cache_valid =0 ; ppd->qsfp_info.cache_refresh_required =1 ;spin_unlock_irqrestore (&ppd->qsfp_info.qsfp_lock, - flags); + flags);/* * Stop inversion of ModPresent pin to detect
@@ -5994,7 +5997,7 @@ static void handle_qsfp_int(struct hfi1_devdata *dd, u32 src_ctx, u64 reg)if (reg &QSFP_HFI0_INT_N ) {dd_dev_info (dd,"%s: IntN triggered QSFP interrupt\n" , - __func__); + __func__);spin_lock_irqsave (&ppd->qsfp_info.qsfp_lock, flags); ppd->qsfp_info.check_interrupt_flags =1 ;spin_unlock_irqrestore (&ppd->qsfp_info.qsfp_lock, flags);
@@ -6010,11 +6013,11 @@ static int request_host_lcb_access(struct hfi1_devdata *dd)int ret; ret =do_8051_command (dd,HCMD_MISC , - (u64 )HCMD_MISC_REQUEST_LCB_ACCESS <<LOAD_DATA_FIELD_ID_SHIFT , -NULL ); + (u64 )HCMD_MISC_REQUEST_LCB_ACCESS << +LOAD_DATA_FIELD_ID_SHIFT ,NULL );if (ret !=HCMD_SUCCESS ) {dd_dev_err (dd,"%s: command failed with error %d\n" , - __func__, ret); + __func__, ret); }return ret ==HCMD_SUCCESS ?0 : -EBUSY ; }
@@ -6024,11 +6027,11 @@ static int request_8051_lcb_access(struct hfi1_devdata *dd)int ret; ret =do_8051_command (dd,HCMD_MISC , - (u64 )HCMD_MISC_GRANT_LCB_ACCESS <<LOAD_DATA_FIELD_ID_SHIFT , -NULL ); + (u64 )HCMD_MISC_GRANT_LCB_ACCESS << +LOAD_DATA_FIELD_ID_SHIFT ,NULL );if (ret !=HCMD_SUCCESS ) {dd_dev_err (dd,"%s: command failed with error %d\n" , - __func__, ret); + __func__, ret); }return ret ==HCMD_SUCCESS ?0 : -EBUSY ; }
@@ -6040,8 +6043,8 @@ static int request_8051_lcb_access(struct hfi1_devdata *dd)static inline void set_host_lcb_access (struct hfi1_devdata *dd) {write_csr (dd,DC_DC8051_CFG_CSR_ACCESS_SEL , -DC_DC8051_CFG_CSR_ACCESS_SEL_DCC_SMASK - |DC_DC8051_CFG_CSR_ACCESS_SEL_LCB_SMASK ); +DC_DC8051_CFG_CSR_ACCESS_SEL_DCC_SMASK | +DC_DC8051_CFG_CSR_ACCESS_SEL_LCB_SMASK ); }/*
@@ -6051,7 +6054,7 @@ static inline void set_host_lcb_access(struct hfi1_devdata *dd)static inline void set_8051_lcb_access (struct hfi1_devdata *dd) {write_csr (dd,DC_DC8051_CFG_CSR_ACCESS_SEL , -DC_DC8051_CFG_CSR_ACCESS_SEL_DCC_SMASK ); +DC_DC8051_CFG_CSR_ACCESS_SEL_DCC_SMASK ); }/*
@@ -6085,7 +6088,7 @@ int acquire_lcb_access(struct hfi1_devdata *dd, int sleep_ok)/* this access is valid only when the link is up */ if ((ppd->host_link_state &HLS_UP ) ==0 ) {dd_dev_info (dd,"%s: link state %s not up\n" , - __func__,link_state_name (ppd->host_link_state)); + __func__,link_state_name (ppd->host_link_state)); ret = -EBUSY ; goto done; }
@@ -6094,8 +6097,8 @@ int acquire_lcb_access(struct hfi1_devdata *dd, int sleep_ok) ret =request_host_lcb_access (dd);if (ret) {dd_dev_err (dd, -"%s: unable to acquire LCB access, err %d\n" , - __func__, ret); +"%s: unable to acquire LCB access, err %d\n" , + __func__, ret); goto done; }set_host_lcb_access (dd);
@@ -6132,7 +6135,7 @@ int release_lcb_access(struct hfi1_devdata *dd, int sleep_ok)if (dd->lcb_access_count ==0 ) {dd_dev_err (dd,"%s: LCB access count is zero. Skipping.\n" , - __func__); + __func__); goto done; }
@@ -6141,8 +6144,8 @@ int release_lcb_access(struct hfi1_devdata *dd, int sleep_ok) ret =request_8051_lcb_access (dd);if (ret) {dd_dev_err (dd, -"%s: unable to release LCB access, err %d\n" , - __func__, ret); +"%s: unable to release LCB access, err %d\n" , + __func__, ret);/* restore host access if the grant didn't work */ set_host_lcb_access (dd); goto done;
@@ -6174,9 +6177,10 @@ static void init_lcb_access(struct hfi1_devdata *dd)static void hreq_response (struct hfi1_devdata *dd,u8 return_code,u16 rsp_data) {write_csr (dd,DC_DC8051_CFG_EXT_DEV_0 , -DC_DC8051_CFG_EXT_DEV_0_COMPLETED_SMASK - | (u64 )return_code <<DC_DC8051_CFG_EXT_DEV_0_RETURN_CODE_SHIFT - | (u64 )rsp_data <<DC_DC8051_CFG_EXT_DEV_0_RSP_DATA_SHIFT ); +DC_DC8051_CFG_EXT_DEV_0_COMPLETED_SMASK | + (u64 )return_code << +DC_DC8051_CFG_EXT_DEV_0_RETURN_CODE_SHIFT | + (u64 )rsp_data <<DC_DC8051_CFG_EXT_DEV_0_RSP_DATA_SHIFT ); }/*
@@ -6214,7 +6218,7 @@ void handle_8051_request(struct work_struct *work)case HREQ_SET_TX_EQ_ABS :case HREQ_SET_TX_EQ_REL :dd_dev_info (dd,"8051 request: request 0x%x not supported\n" , - type); + type);hreq_response (dd,HREQ_NOT_SUPPORTED ,0 );break ;
@@ -6272,11 +6276,11 @@ static void write_global_credit(struct hfi1_devdata *dd, u8 vau, u16 total, u16 shared) { write_csr(dd, SEND_CM_GLOBAL_CREDIT, - ((u64)total - << SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_SHIFT) - | ((u64)shared - << SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_SHIFT) - | ((u64)vau << SEND_CM_GLOBAL_CREDIT_AU_SHIFT)); + ((u64)total << + SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_SHIFT) | + ((u64)shared << + SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_SHIFT) | + ((u64)vau << SEND_CM_GLOBAL_CREDIT_AU_SHIFT)); }/*
@@ -6355,14 +6359,13 @@ static void lcb_shutdown(struct hfi1_devdata *dd, int abort)write_csr (dd,DC_LCB_CFG_RUN ,0 );/* set tx fifo reset: LCB_CFG_TX_FIFOS_RESET.VAL = 1 */ write_csr (dd,DC_LCB_CFG_TX_FIFOS_RESET , -1ull <<DC_LCB_CFG_TX_FIFOS_RESET_VAL_SHIFT ); +1ull <<DC_LCB_CFG_TX_FIFOS_RESET_VAL_SHIFT );/* set dcc reset csr: DCC_CFG_RESET.{reset_lcb,reset_rx_fpe} = 1 */ dd->lcb_err_en =read_csr (dd,DC_LCB_ERR_EN ); reg =read_csr (dd,DCC_CFG_RESET ); -write_csr (dd,DCC_CFG_RESET , - reg - | (1ull <<DCC_CFG_RESET_RESET_LCB_SHIFT ) - | (1ull <<DCC_CFG_RESET_RESET_RX_FPE_SHIFT )); +write_csr (dd,DCC_CFG_RESET , reg | + (1ull <<DCC_CFG_RESET_RESET_LCB_SHIFT ) | + (1ull <<DCC_CFG_RESET_RESET_RX_FPE_SHIFT )); (void )read_csr (dd,DCC_CFG_RESET );/* make sure the write completed */ if (!abort) {udelay (1 );/* must hold for the longer of 16cclks or 20ns */
@@ -6419,7 +6422,7 @@ static void dc_start(struct hfi1_devdata *dd) ret =wait_fm_ready (dd,TIMEOUT_8051_START );if (ret) {dd_dev_err (dd,"%s: timeout starting 8051 firmware\n" , - __func__); + __func__); }/* Take away reset for LCB and RX FPE (set in lcb_shutdown). */ write_csr (dd,DCC_CFG_RESET ,0x10 );
@@ -6512,7 +6515,7 @@ static void adjust_lcb_for_fpga_serdes(struct hfi1_devdata *dd)write_csr (dd,DC_LCB_CFG_RX_FIFOS_RADR , rx_radr);/* LCB_CFG_IGNORE_LOST_RCLK.EN = 1 */ write_csr (dd,DC_LCB_CFG_IGNORE_LOST_RCLK , -DC_LCB_CFG_IGNORE_LOST_RCLK_EN_SMASK ); +DC_LCB_CFG_IGNORE_LOST_RCLK_EN_SMASK );write_csr (dd,DC_LCB_CFG_TX_FIFOS_RADR , tx_radr); }
@@ -6571,8 +6574,8 @@ void handle_sma_message(struct work_struct *work)break ;default :dd_dev_err (dd, -"%s: received unexpected SMA idle message 0x%llx\n" , - __func__, msg); +"%s: received unexpected SMA idle message 0x%llx\n" , + __func__, msg);break ; } }
@@ -6664,10 +6667,9 @@ static void wait_for_freeze_status(struct hfi1_devdata *dd, int freeze)if (time_after (jiffies, timeout)) {dd_dev_err (dd, -"Time out waiting for SPC %sfreeze, bits 0x%llx, expecting 0x%llx, continuing" , - freeze ?"" :"un" , - reg &ALL_FROZE , - freeze ?ALL_FROZE :0ull ); +"Time out waiting for SPC %sfreeze, bits 0x%llx, expecting 0x%llx, continuing" , + freeze ?"" :"un" , reg &ALL_FROZE , + freeze ?ALL_FROZE :0ull );return ; }usleep_range (80 ,120 );
@@ -6792,7 +6794,7 @@ void handle_freeze(struct work_struct *work)void handle_link_up (struct work_struct *work) { struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, - link_up_work); + link_up_work);set_link_state (ppd,HLS_UP_INIT );/* cache the read of DC_LCB_STS_ROUND_TRIP_LTP_CNT */
@@ -6811,10 +6813,10 @@ void handle_link_up(struct work_struct *work)if ((ppd->link_speed_active & ppd->link_speed_enabled) ==0 ) {/* oops - current speed is not enabled, bounce */ dd_dev_err (ppd->dd, -"Link speed active 0x%x is outside enabled 0x%x, downing link\n" , - ppd->link_speed_active, ppd->link_speed_enabled); +"Link speed active 0x%x is outside enabled 0x%x, downing link\n" , + ppd->link_speed_active, ppd->link_speed_enabled);set_link_down_reason (ppd,OPA_LINKDOWN_REASON_SPEED_POLICY ,0 , -OPA_LINKDOWN_REASON_SPEED_POLICY ); +OPA_LINKDOWN_REASON_SPEED_POLICY );set_link_state (ppd,HLS_DN_OFFLINE );tune_serdes (ppd);start_link (ppd);
@@ -6896,7 +6898,7 @@ void handle_link_bounce(struct work_struct *work)start_link (ppd); }else {dd_dev_info (ppd->dd,"%s: link not up (%s), nothing to do\n" , - __func__,link_state_name (ppd->host_link_state)); + __func__,link_state_name (ppd->host_link_state)); } }
@@ -6993,7 +6995,7 @@ static u16 link_width_to_bits(struct hfi1_devdata *dd, u16 width)case 3 :return OPA_LINK_WIDTH_3X ;default :dd_dev_info (dd,"%s: invalid width %d, using 4\n" , - __func__, width); + __func__, width);/* fall through */ case 4 :return OPA_LINK_WIDTH_4X ; }
@@ -7031,7 +7033,7 @@ static void get_link_widths(struct hfi1_devdata *dd, u16 *tx_width,/* read the active lanes */ read_tx_settings (dd, &enable_lane_tx, &tx_polarity_inversion, - &rx_polarity_inversion, &max_rate); + &rx_polarity_inversion, &max_rate);read_local_lni (dd, &enable_lane_rx);/* convert to counts */
@@ -7052,8 +7054,8 @@ static void get_link_widths(struct hfi1_devdata *dd, u16 *tx_width,break ;default :dd_dev_err (dd, -"%s: unexpected max rate %d, using 25Gb\n" , - __func__, (int )max_rate); +"%s: unexpected max rate %d, using 25Gb\n" , + __func__, (int )max_rate);/* fall through */ case 1 : dd->pport[0 ].link_speed_active =OPA_LINK_SPEED_25G ;
@@ -7062,8 +7064,8 @@ static void get_link_widths(struct hfi1_devdata *dd, u16 *tx_width, }dd_dev_info (dd, -"Fabric active lanes (width): tx 0x%x (%d), rx 0x%x (%d)\n" , - enable_lane_tx, tx, enable_lane_rx, rx); +"Fabric active lanes (width): tx 0x%x (%d), rx 0x%x (%d)\n" , + enable_lane_tx, tx, enable_lane_rx, rx); *tx_width =link_width_to_bits (dd, tx); *rx_width =link_width_to_bits (dd, rx); }
@@ -7166,13 +7168,8 @@ void handle_verify_cap(struct work_struct *work)*/ read_vc_remote_phy (dd, &power_management, &continious); -read_vc_remote_fabric ( - dd, - &vau, - &z, - &vcu, - &vl15buf, - &partner_supported_crc); +read_vc_remote_fabric (dd, &vau, &z, &vcu, &vl15buf, + &partner_supported_crc);read_vc_remote_link_width (dd, &remote_tx_rate, &link_widths);read_remote_device_id (dd, &device_id, &device_rev);/*
@@ -7183,19 +7180,16 @@ void handle_verify_cap(struct work_struct *work)/* print the active widths */ get_link_widths (dd, &active_tx, &active_rx);dd_dev_info (dd, -"Peer PHY: power management 0x%x, continuous updates 0x%x\n" , - (int )power_management, (int )continious); +"Peer PHY: power management 0x%x, continuous updates 0x%x\n" , + (int )power_management, (int )continious);dd_dev_info (dd, -"Peer Fabric: vAU %d, Z %d, vCU %d, vl15 credits 0x%x, CRC sizes 0x%x\n" , - (int )vau, - (int )z, - (int )vcu, - (int )vl15buf, - (int )partner_supported_crc); +"Peer Fabric: vAU %d, Z %d, vCU %d, vl15 credits 0x%x, CRC sizes 0x%x\n" , + (int )vau, (int )z, (int )vcu, (int )vl15buf, + (int )partner_supported_crc);dd_dev_info (dd,"Peer Link Width: tx rate 0x%x, widths 0x%x\n" , - (u32 )remote_tx_rate, (u32 )link_widths); + (u32 )remote_tx_rate, (u32 )link_widths);dd_dev_info (dd,"Peer Device ID: 0x%04x, Revision 0x%02x\n" , - (u32 )device_id, (u32 )device_rev); + (u32 )device_id, (u32 )device_rev);/* * The peer vAU value just read is the peer receiver value. HFI does * not support a transmit vAU of 0 (AU == 8). We advertised that
@@ -7230,10 +7224,10 @@ void handle_verify_cap(struct work_struct *work) reg =read_csr (dd,SEND_CM_CTRL );if (crc_val ==LCB_CRC_14B && crc_14b_sideband) {write_csr (dd,SEND_CM_CTRL , - reg |SEND_CM_CTRL_FORCE_CREDIT_MODE_SMASK ); + reg |SEND_CM_CTRL_FORCE_CREDIT_MODE_SMASK ); }else {write_csr (dd,SEND_CM_CTRL , - reg & ~SEND_CM_CTRL_FORCE_CREDIT_MODE_SMASK ); + reg & ~SEND_CM_CTRL_FORCE_CREDIT_MODE_SMASK ); } ppd->link_speed_active =0 ;/* invalid value */
@@ -7258,7 +7252,7 @@ void handle_verify_cap(struct work_struct *work) }if (ppd->link_speed_active ==0 ) {dd_dev_err (dd,"%s: unexpected remote tx rate %d, using 25Gb\n" , - __func__, (int )remote_tx_rate); + __func__, (int )remote_tx_rate); ppd->link_speed_active =OPA_LINK_SPEED_25G ; }
@@ -7314,9 +7308,9 @@ void handle_verify_cap(struct work_struct *work)read_csr (dd,DC_DC8051_STS_REMOTE_FM_SECURITY ) &DC_DC8051_STS_LOCAL_FM_SECURITY_DISABLED_MASK ;dd_dev_info (dd, -"Neighbor Guid: %llx Neighbor type %d MgmtAllowed %d FM security bypass %d\n" , - ppd->neighbor_guid, ppd->neighbor_type, - ppd->mgmt_allowed, ppd->neighbor_fm_security); +"Neighbor Guid: %llx Neighbor type %d MgmtAllowed %d FM security bypass %d\n" , + ppd->neighbor_guid, ppd->neighbor_type, + ppd->mgmt_allowed, ppd->neighbor_fm_security);if (ppd->mgmt_allowed)add_full_mgmt_pkey (ppd);
@@ -7369,27 +7363,28 @@ retry:/* downgrade is disabled */ /* bounce if not at starting active width */ -if ((ppd->link_width_active != ppd->link_width_downgrade_tx_active) || - (ppd->link_width_active != ppd->link_width_downgrade_rx_active)) { +if ((ppd->link_width_active != + ppd->link_width_downgrade_tx_active) || + (ppd->link_width_active != + ppd->link_width_downgrade_rx_active)) {dd_dev_err (ppd->dd, -"Link downgrade is disabled and link has downgraded, downing link\n" ); +"Link downgrade is disabled and link has downgraded, downing link\n" );dd_dev_err (ppd->dd, -" original 0x%x, tx active 0x%x, rx active 0x%x\n" , - ppd->link_width_active, - ppd->link_width_downgrade_tx_active, - ppd->link_width_downgrade_rx_active); +" original 0x%x, tx active 0x%x, rx active 0x%x\n" , + ppd->link_width_active, + ppd->link_width_downgrade_tx_active, + ppd->link_width_downgrade_rx_active); do_bounce =1 ; } }else if ((lwde & ppd->link_width_downgrade_tx_active) ==0 || (lwde & ppd->link_width_downgrade_rx_active) ==0 ) {/* Tx or Rx is outside the enabled policy */ dd_dev_err (ppd->dd, -"Link is outside of downgrade allowed, downing link\n" ); +"Link is outside of downgrade allowed, downing link\n" );dd_dev_err (ppd->dd, -" enabled 0x%x, tx active 0x%x, rx active 0x%x\n" , - lwde, - ppd->link_width_downgrade_tx_active, - ppd->link_width_downgrade_rx_active); +" enabled 0x%x, tx active 0x%x, rx active 0x%x\n" , + lwde, ppd->link_width_downgrade_tx_active, + ppd->link_width_downgrade_rx_active); do_bounce =1 ; }
@@ -7398,7 +7393,7 @@ done:if (do_bounce) {set_link_down_reason (ppd,OPA_LINKDOWN_REASON_WIDTH_POLICY ,0 , -OPA_LINKDOWN_REASON_WIDTH_POLICY ); +OPA_LINKDOWN_REASON_WIDTH_POLICY );set_link_state (ppd,HLS_DN_OFFLINE );tune_serdes (ppd);start_link (ppd);
@@ -7481,9 +7476,10 @@ static void handle_8051_interrupt(struct hfi1_devdata *dd, u32 unused, u64 reg) & (HLS_DN_POLL | HLS_VERIFY_CAP | HLS_GOING_UP)) { queue_link_down =1 ;dd_dev_info (dd,"Link error: %s\n" , -dc8051_info_err_string (buf, -sizeof (buf), - err &FAILED_LNI )); +dc8051_info_err_string (buf, +sizeof (buf), + err & +FAILED_LNI )); } err &= ~(u64 )FAILED_LNI ; }
@@ -7495,7 +7491,8 @@ static void handle_8051_interrupt(struct hfi1_devdata *dd, u32 unused, u64 reg)if (err) {/* report remaining errors, but do not do anything */ dd_dev_err (dd,"8051 info error: %s\n" , -dc8051_info_err_string (buf,sizeof (buf), err)); +dc8051_info_err_string (buf,sizeof (buf), + err)); }/*
@@ -7548,8 +7545,9 @@ static void handle_8051_interrupt(struct hfi1_devdata *dd, u32 unused, u64 reg)if (host_msg) {/* report remaining messages, but do not do anything */ dd_dev_info (dd,"8051 info host message: %s\n" , -dc8051_info_host_msg_string (buf,sizeof (buf), - host_msg)); +dc8051_info_host_msg_string (buf, +sizeof (buf), + host_msg)); } reg &= ~DC_DC8051_ERR_FLG_SET_BY_8051_SMASK ;
@@ -7562,15 +7560,15 @@ static void handle_8051_interrupt(struct hfi1_devdata *dd, u32 unused, u64 reg)*/ dd_dev_err (dd,"Lost 8051 heartbeat\n" );write_csr (dd,DC_DC8051_ERR_EN , -read_csr (dd,DC_DC8051_ERR_EN ) - & ~DC_DC8051_ERR_EN_LOST_8051_HEART_BEAT_SMASK ); +read_csr (dd,DC_DC8051_ERR_EN ) & + ~DC_DC8051_ERR_EN_LOST_8051_HEART_BEAT_SMASK ); reg &= ~DC_DC8051_ERR_FLG_LOST_8051_HEART_BEAT_SMASK ; }if (reg) {/* report the error, but do not do anything */ dd_dev_err (dd,"8051 error: %s\n" , -dc8051_err_string (buf,sizeof (buf), reg)); +dc8051_err_string (buf,sizeof (buf), reg)); }if (queue_link_down) {
@@ -7582,7 +7580,7 @@ static void handle_8051_interrupt(struct hfi1_devdata *dd, u32 unused, u64 reg) (HLS_GOING_OFFLINE | HLS_LINK_COOLDOWN)) || ppd->link_enabled == 0) { dd_dev_info(dd, "%s: not queuing link down\n", - __func__); + __func__); } else {queue_work (ppd->hfi1_wq, &ppd->link_down_work); }
@@ -7760,7 +7758,7 @@ static void handle_dcc_err(struct hfi1_devdata *dd, u32 unused, u64 reg)/* just report this */ dd_dev_info (dd,"DCC Error: PortRcv error: %s\n" , extra);dd_dev_info (dd," hdr0 0x%llx, hdr1 0x%llx\n" , - hdr0, hdr1); + hdr0, hdr1); reg &= ~DCC_ERR_FLG_RCVPORT_ERR_SMASK ; }
@@ -7779,7 +7777,7 @@ static void handle_dcc_err(struct hfi1_devdata *dd, u32 unused, u64 reg)/* report any remaining errors */ if (reg)dd_dev_info (dd,"DCC Error: %s\n" , -dcc_err_string (buf,sizeof (buf), reg)); +dcc_err_string (buf,sizeof (buf), reg));if (lcl_reason ==0 ) lcl_reason =OPA_LINKDOWN_REASON_UNKNOWN ;
@@ -7796,7 +7794,7 @@ static void handle_lcb_err(struct hfi1_devdata *dd, u32 unused, u64 reg)char buf[96 ];dd_dev_info (dd,"LCB Error: %s\n" , -lcb_err_string (buf,sizeof (buf), reg)); +lcb_err_string (buf,sizeof (buf), reg)); }/*
@@ -7886,7 +7884,7 @@ static void is_rcv_avail_int(struct hfi1_devdata *dd, unsigned int source) err_detail ="out of range" ; }dd_dev_err (dd,"unexpected %s receive available context interrupt %u\n" , - err_detail, source); + err_detail, source); }/*
@@ -7912,7 +7910,7 @@ static void is_rcv_urgent_int(struct hfi1_devdata *dd, unsigned int source) err_detail ="out of range" ; }dd_dev_err (dd,"unexpected %s receive urgent context interrupt %u\n" , - err_detail, source); + err_detail, source); }/*
@@ -7923,7 +7921,7 @@ static void is_reserved_int(struct hfi1_devdata *dd, unsigned int source)char name[64 ];dd_dev_err (dd,"unexpected %s interrupt\n" , -is_reserved_name (name,sizeof (name), source)); +is_reserved_name (name,sizeof (name), source)); }static const struct is_table is_table[] = {
@@ -8001,7 +7999,7 @@ static irqreturn_t general_interrupt(int irq, void *data)/* phase 2: call the appropriate handler */ for_each_set_bit (bit, (unsigned long *)®s[0 ], -CCE_NUM_INT_CSRS *64 ) { +CCE_NUM_INT_CSRS *64 ) {is_interrupt (dd, bit); }
@@ -8024,19 +8022,19 @@ static irqreturn_t sdma_interrupt(int irq, void *data)/* This read_csr is really bad in the hot path */ status =read_csr (dd, -CCE_INT_STATUS + (8 * (IS_SDMA_START /64 ))) - & sde->imask; +CCE_INT_STATUS + (8 * (IS_SDMA_START /64 ))) + & sde->imask;if (likely (status)) {/* clear the interrupt(s) */ write_csr (dd, -CCE_INT_CLEAR + (8 * (IS_SDMA_START /64 )), - status); +CCE_INT_CLEAR + (8 * (IS_SDMA_START /64 )), + status);/* handle the interrupt(s) */ sdma_engine_interrupt (sde, status); }else dd_dev_err (dd,"SDMA engine %u interrupt, but no status bits set\n" , - sde->this_idx); + sde->this_idx);return IRQ_HANDLED ; }
@@ -8436,8 +8434,8 @@ int load_8051_config(struct hfi1_devdata *dd, u8 field_id, ret =do_8051_command (dd,HCMD_LOAD_CONFIG_DATA , data,NULL );if (ret !=HCMD_SUCCESS ) {dd_dev_err (dd, -"load 8051 config: field id %d, lane %d, err %d\n" , - (int )field_id, (int )lane_id, ret); +"load 8051 config: field id %d, lane %d, err %d\n" , + (int )field_id, (int )lane_id, ret); }return ret; }
@@ -8474,7 +8472,7 @@ int read_8051_config(struct hfi1_devdata *dd, u8 field_id, u8 lane_id, }else { *result =0 ;dd_dev_err (dd,"%s: direct read failed, lane %d, field %d!\n" , - __func__, lane_id, field_id); + __func__, lane_id, field_id); }return ret;
@@ -8511,7 +8509,7 @@ static void read_vc_local_link_width(struct hfi1_devdata *dd, u8 *misc_bits,u32 frame;read_8051_config (dd,VERIFY_CAP_LOCAL_LINK_WIDTH ,GENERAL_CONFIG , - &frame); + &frame); *misc_bits = (frame >>MISC_CONFIG_BITS_SHIFT ) &MISC_CONFIG_BITS_MASK ; *flag_bits = (frame >>LOCAL_FLAG_BITS_SHIFT ) &LOCAL_FLAG_BITS_MASK ; *link_widths = (frame >>LINK_WIDTH_SHIFT ) &LINK_WIDTH_MASK ;
@@ -8593,7 +8591,7 @@ static void read_vc_remote_link_width(struct hfi1_devdata *dd,u32 frame;read_8051_config (dd,VERIFY_CAP_REMOTE_LINK_WIDTH ,GENERAL_CONFIG , - &frame); + &frame); *remote_tx_rate = (frame >>REMOTE_TX_RATE_SHIFT ) &REMOTE_TX_RATE_MASK ; *link_widths = (frame >>LINK_WIDTH_SHIFT ) &LINK_WIDTH_MASK ;
@@ -8633,7 +8631,7 @@ void hfi1_read_link_quality(struct hfi1_devdata *dd, u8 *link_quality) *link_quality =0 ;if (dd->pport->host_link_state &HLS_UP ) { ret =read_8051_config (dd,LINK_QUALITY_INFO ,GENERAL_CONFIG , - &frame); + &frame);if (ret ==0 ) *link_quality = (frame >>LINK_QUALITY_SHIFT ) &LINK_QUALITY_MASK ;
@@ -8693,10 +8691,9 @@ static void check_fabric_firmware_versions(struct hfi1_devdata *dd)for (lane =0 ; lane <4 ; lane++) { ret =read_8051_config (dd,SPICO_FW_VERSION , lane, &frame);if (ret) { -dd_dev_err ( - dd, -"Unable to read lane %d firmware details\n" , - lane); +dd_dev_err (dd, +"Unable to read lane %d firmware details\n" , + lane);continue ; } version = (frame >>SPICO_ROM_VERSION_SHIFT )
@@ -8704,8 +8701,8 @@ static void check_fabric_firmware_versions(struct hfi1_devdata *dd) prod_id = (frame >>SPICO_ROM_PROD_ID_SHIFT ) &SPICO_ROM_PROD_ID_MASK ;dd_dev_info (dd, -"Lane %d firmware: version 0x%04x, prod_id 0x%04x\n" , - lane, version, prod_id); +"Lane %d firmware: version 0x%04x, prod_id 0x%04x\n" , + lane, version, prod_id); } }
@@ -8718,11 +8715,10 @@ static int read_idle_message(struct hfi1_devdata *dd, u64 type, u64 *data_out) {int ret; - ret =do_8051_command (dd,HCMD_READ_LCB_IDLE_MSG , - type, data_out); + ret =do_8051_command (dd,HCMD_READ_LCB_IDLE_MSG , type, data_out);if (ret !=HCMD_SUCCESS ) {dd_dev_err (dd,"read idle message: type %d, err %d\n" , - (u32 )type, ret); + (u32 )type, ret);return -EINVAL ; }dd_dev_info (dd,"%s: read idle message 0x%llx\n" , __func__, *data_out);
@@ -8739,8 +8735,8 @@ static int read_idle_message(struct hfi1_devdata *dd, u64 type, u64 *data_out)*/ static int read_idle_sma (struct hfi1_devdata *dd,u64 *data) { -return read_idle_message (dd, - (u64 )IDLE_SMA <<IDLE_MSG_TYPE_SHIFT , data); +return read_idle_message (dd, (u64 )IDLE_SMA <<IDLE_MSG_TYPE_SHIFT , + data); }/*
@@ -8756,7 +8752,7 @@ static int send_idle_message(struct hfi1_devdata *dd, u64 data) ret =do_8051_command (dd,HCMD_SEND_LCB_IDLE_MSG , data,NULL );if (ret !=HCMD_SUCCESS ) {dd_dev_err (dd,"send idle message: data 0x%llx, err %d\n" , - data, ret); + data, ret);return -EINVAL ; }return 0 ;
@@ -8771,8 +8767,8 @@ int send_idle_sma(struct hfi1_devdata *dd, u64 message) {u64 data; - data = ((message &IDLE_PAYLOAD_MASK ) <<IDLE_PAYLOAD_SHIFT ) - | ((u64 )IDLE_SMA <<IDLE_MSG_TYPE_SHIFT ); + data = ((message &IDLE_PAYLOAD_MASK ) <<IDLE_PAYLOAD_SHIFT ) | + ((u64 )IDLE_SMA <<IDLE_MSG_TYPE_SHIFT );return send_idle_message (dd, data); }
@@ -8794,7 +8790,7 @@ static int do_quick_linkup(struct hfi1_devdata *dd)/* LCB_CFG_LOOPBACK.VAL = 2 */ /* LCB_CFG_LANE_WIDTH.VAL = 0 */ write_csr (dd,DC_LCB_CFG_LOOPBACK , -IB_PACKET_TYPE <<DC_LCB_CFG_LOOPBACK_VAL_SHIFT ); +IB_PACKET_TYPE <<DC_LCB_CFG_LOOPBACK_VAL_SHIFT );write_csr (dd,DC_LCB_CFG_LANE_WIDTH ,0 ); }
@@ -8806,25 +8802,24 @@ static int do_quick_linkup(struct hfi1_devdata *dd)if (loopback && dd->icode ==ICODE_FUNCTIONAL_SIMULATOR ) {/* LCB_CFG_RUN.EN = 1 */ write_csr (dd,DC_LCB_CFG_RUN , -1ull <<DC_LCB_CFG_RUN_EN_SHIFT ); +1ull <<DC_LCB_CFG_RUN_EN_SHIFT );/* watch LCB_STS_LINK_TRANSFER_ACTIVE */ timeout = jiffies +msecs_to_jiffies (10 );while (1 ) { - reg =read_csr (dd, -DC_LCB_STS_LINK_TRANSFER_ACTIVE ); + reg =read_csr (dd,DC_LCB_STS_LINK_TRANSFER_ACTIVE );if (reg)break ;if (time_after (jiffies, timeout)) {dd_dev_err (dd, -"timeout waiting for LINK_TRANSFER_ACTIVE\n" ); +"timeout waiting for LINK_TRANSFER_ACTIVE\n" );return -ETIMEDOUT ; }udelay (2 ); }write_csr (dd,DC_LCB_CFG_ALLOW_LINK_UP , -1ull <<DC_LCB_CFG_ALLOW_LINK_UP_VAL_SHIFT ); +1ull <<DC_LCB_CFG_ALLOW_LINK_UP_VAL_SHIFT ); }if (!loopback) {
@@ -8836,10 +8831,9 @@ static int do_quick_linkup(struct hfi1_devdata *dd)* done with LCB set up before resuming. */ dd_dev_err (dd, -"Pausing for peer to be finished with LCB set up\n" ); +"Pausing for peer to be finished with LCB set up\n" );msleep (5000 ); -dd_dev_err (dd, -"Continuing with quick linkup\n" ); +dd_dev_err (dd,"Continuing with quick linkup\n" ); }write_csr (dd,DC_LCB_ERR_EN ,0 );/* mask LCB errors */
@@ -8853,8 +8847,8 @@ static int do_quick_linkup(struct hfi1_devdata *dd) ret =set_physical_link_state (dd,PLS_QUICK_LINKUP );if (ret !=HCMD_SUCCESS ) {dd_dev_err (dd, -"%s: set physical link state to quick LinkUp failed with return %d\n" , - __func__, ret); +"%s: set physical link state to quick LinkUp failed with return %d\n" , + __func__, ret);set_host_lcb_access (dd);write_csr (dd,DC_LCB_ERR_EN , ~0ull );/* watch LCB errors */
@@ -8879,8 +8873,8 @@ static int set_serdes_loopback_mode(struct hfi1_devdata *dd)if (ret ==HCMD_SUCCESS )return 0 ;dd_dev_err (dd, -"Set physical link state to SerDes Loopback failed with return %d\n" , - ret); +"Set physical link state to SerDes Loopback failed with return %d\n" , + ret);if (ret >=0 ) ret = -EINVAL ;return ret;
@@ -8895,7 +8889,7 @@ static int init_loopback(struct hfi1_devdata *dd)/* all loopbacks should disable self GUID check */ write_csr (dd,DC_DC8051_CFG_MODE , - (read_csr (dd,DC_DC8051_CFG_MODE ) |DISABLE_SELF_GUID_CHECK )); + (read_csr (dd,DC_DC8051_CFG_MODE ) |DISABLE_SELF_GUID_CHECK ));/* * The simulator has only one loopback option - LCB. Switch
@@ -8926,7 +8920,7 @@ static int init_loopback(struct hfi1_devdata *dd)/* not supported in emulation due to emulation RTL changes */ if (dd->icode ==ICODE_FPGA_EMULATION ) {dd_dev_err (dd, -"LCB loopback not supported in emulation\n" ); +"LCB loopback not supported in emulation\n" );return -EINVAL ; }return 0 ;
@@ -8982,7 +8976,7 @@ static int set_local_link_attributes(struct hfi1_pportdata *ppd)/* set the local tx rate - need to read-modify-write */ ret =read_tx_settings (dd, &enable_lane_tx, &tx_polarity_inversion, - &rx_polarity_inversion, &ppd->local_tx_rate); + &rx_polarity_inversion, &ppd->local_tx_rate);if (ret) goto set_local_link_attributes_fail;
@@ -9003,15 +8997,16 @@ static int set_local_link_attributes(struct hfi1_pportdata *ppd) enable_lane_tx =0xF ;/* enable all four lanes */ ret =write_tx_settings (dd, enable_lane_tx, tx_polarity_inversion, - rx_polarity_inversion, ppd->local_tx_rate); + rx_polarity_inversion, ppd->local_tx_rate);if (ret !=HCMD_SUCCESS ) goto set_local_link_attributes_fail;/* * DC supports continuous updates. */ - ret =write_vc_local_phy (dd,0 /* no power management */ , -1 /* continuous updates */ ); + ret =write_vc_local_phy (dd, +0 /* no power management */ , +1 /* continuous updates */ );if (ret !=HCMD_SUCCESS ) goto set_local_link_attributes_fail;
@@ -9022,7 +9017,8 @@ static int set_local_link_attributes(struct hfi1_pportdata *ppd) goto set_local_link_attributes_fail; ret =write_vc_local_link_width (dd,0 ,0 , -opa_to_vc_link_widths (ppd->link_width_enabled)); +opa_to_vc_link_widths ( + ppd->link_width_enabled));if (ret !=HCMD_SUCCESS ) goto set_local_link_attributes_fail;
@@ -9033,8 +9029,8 @@ static int set_local_link_attributes(struct hfi1_pportdata *ppd) set_local_link_attributes_fail:dd_dev_err (dd, -"Failed to set local link attributes, return 0x%x\n" , - ret); +"Failed to set local link attributes, return 0x%x\n" , + ret);return ret; }
@@ -9047,25 +9043,25 @@ int start_link(struct hfi1_pportdata *ppd) {if (!ppd->link_enabled) {dd_dev_info (ppd->dd, -"%s: stopping link start because link is disabled\n" , - __func__); +"%s: stopping link start because link is disabled\n" , + __func__);return 0 ; }if (!ppd->driver_link_ready) {dd_dev_info (ppd->dd, -"%s: stopping link start because driver is not ready\n" , - __func__); +"%s: stopping link start because driver is not ready\n" , + __func__);return 0 ; }if (qsfp_mod_present (ppd) || loopback ==LOOPBACK_SERDES || - loopback ==LOOPBACK_LCB || - ppd->dd->icode ==ICODE_FUNCTIONAL_SIMULATOR ) + loopback ==LOOPBACK_LCB || + ppd->dd->icode ==ICODE_FUNCTIONAL_SIMULATOR )return set_link_state (ppd,HLS_DN_POLL );dd_dev_info (ppd->dd, -"%s: stopping link start because no cable is present\n" , - __func__); +"%s: stopping link start because no cable is present\n" , + __func__);return -EAGAIN ; }
@@ -9121,20 +9117,19 @@ void reset_qsfp(struct hfi1_pportdata *ppd) mask = (u64 )QSFP_HFI0_RESET_N ; qsfp_mask =read_csr (dd, dd->hfi1_id ?ASIC_QSFP2_OE :ASIC_QSFP1_OE ); qsfp_mask |= mask; -write_csr (dd, - dd->hfi1_id ?ASIC_QSFP2_OE :ASIC_QSFP1_OE , qsfp_mask); +write_csr (dd, dd->hfi1_id ?ASIC_QSFP2_OE :ASIC_QSFP1_OE , qsfp_mask); - qsfp_mask =read_csr (dd, dd->hfi1_id ? -ASIC_QSFP2_OUT :ASIC_QSFP1_OUT ); + qsfp_mask =read_csr (dd, + dd->hfi1_id ?ASIC_QSFP2_OUT :ASIC_QSFP1_OUT ); qsfp_mask &= ~mask;write_csr (dd, - dd->hfi1_id ?ASIC_QSFP2_OUT :ASIC_QSFP1_OUT , qsfp_mask); + dd->hfi1_id ?ASIC_QSFP2_OUT :ASIC_QSFP1_OUT , qsfp_mask);udelay (10 ); qsfp_mask |= mask;write_csr (dd, - dd->hfi1_id ?ASIC_QSFP2_OUT :ASIC_QSFP1_OUT , qsfp_mask); + dd->hfi1_id ?ASIC_QSFP2_OUT :ASIC_QSFP1_OUT , qsfp_mask);wait_for_qsfp_init (ppd);
@@ -9151,102 +9146,86 @@ static int handle_qsfp_error_conditions(struct hfi1_pportdata *ppd,struct hfi1_devdata *dd = ppd->dd;if ((qsfp_interrupt_status[0 ] &QSFP_HIGH_TEMP_ALARM ) || - (qsfp_interrupt_status[0 ] &QSFP_HIGH_TEMP_WARNING )) -dd_dev_info (dd, -"%s: QSFP cable on fire\n" , - __func__); + (qsfp_interrupt_status[0 ] &QSFP_HIGH_TEMP_WARNING )) +dd_dev_info (dd,"%s: QSFP cable on fire\n" , + __func__);if ((qsfp_interrupt_status[0 ] &QSFP_LOW_TEMP_ALARM ) || - (qsfp_interrupt_status[0 ] &QSFP_LOW_TEMP_WARNING )) -dd_dev_info (dd, -"%s: QSFP cable temperature too low\n" , - __func__); + (qsfp_interrupt_status[0 ] &QSFP_LOW_TEMP_WARNING )) +dd_dev_info (dd,"%s: QSFP cable temperature too low\n" , + __func__);if ((qsfp_interrupt_status[1 ] &QSFP_HIGH_VCC_ALARM ) || - (qsfp_interrupt_status[1 ] &QSFP_HIGH_VCC_WARNING )) -dd_dev_info (dd, -"%s: QSFP supply voltage too high\n" , - __func__); + (qsfp_interrupt_status[1 ] &QSFP_HIGH_VCC_WARNING )) +dd_dev_info (dd,"%s: QSFP supply voltage too high\n" , + __func__);if ((qsfp_interrupt_status[1 ] &QSFP_LOW_VCC_ALARM ) || - (qsfp_interrupt_status[1 ] &QSFP_LOW_VCC_WARNING )) -dd_dev_info (dd, -"%s: QSFP supply voltage too low\n" , - __func__); + (qsfp_interrupt_status[1 ] &QSFP_LOW_VCC_WARNING )) +dd_dev_info (dd,"%s: QSFP supply voltage too low\n" , + __func__);/* Byte 2 is vendor specific */ if ((qsfp_interrupt_status[3 ] &QSFP_HIGH_POWER_ALARM ) || - (qsfp_interrupt_status[3 ] &QSFP_HIGH_POWER_WARNING )) -dd_dev_info (dd, -"%s: Cable RX channel 1/2 power too high\n" , - __func__); + (qsfp_interrupt_status[3 ] &QSFP_HIGH_POWER_WARNING )) +dd_dev_info (dd,"%s: Cable RX channel 1/2 power too high\n" , + __func__);if ((qsfp_interrupt_status[3 ] &QSFP_LOW_POWER_ALARM ) || - (qsfp_interrupt_status[3 ] &QSFP_LOW_POWER_WARNING )) -dd_dev_info (dd, -"%s: Cable RX channel 1/2 power too low\n" , - __func__); + (qsfp_interrupt_status[3 ] &QSFP_LOW_POWER_WARNING )) +dd_dev_info (dd,"%s: Cable RX channel 1/2 power too low\n" , + __func__);if ((qsfp_interrupt_status[4 ] &QSFP_HIGH_POWER_ALARM ) || - (qsfp_interrupt_status[4 ] &QSFP_HIGH_POWER_WARNING )) -dd_dev_info (dd, -"%s: Cable RX channel 3/4 power too high\n" , - __func__); + (qsfp_interrupt_status[4 ] &QSFP_HIGH_POWER_WARNING )) +dd_dev_info (dd,"%s: Cable RX channel 3/4 power too high\n" , + __func__);if ((qsfp_interrupt_status[4 ] &QSFP_LOW_POWER_ALARM ) || - (qsfp_interrupt_status[4 ] &QSFP_LOW_POWER_WARNING )) -dd_dev_info (dd, -"%s: Cable RX channel 3/4 power too low\n" , - __func__); + (qsfp_interrupt_status[4 ] &QSFP_LOW_POWER_WARNING )) +dd_dev_info (dd,"%s: Cable RX channel 3/4 power too low\n" , + __func__);if ((qsfp_interrupt_status[5 ] &QSFP_HIGH_BIAS_ALARM ) || - (qsfp_interrupt_status[5 ] &QSFP_HIGH_BIAS_WARNING )) -dd_dev_info (dd, -"%s: Cable TX channel 1/2 bias too high\n" , - __func__); + (qsfp_interrupt_status[5 ] &QSFP_HIGH_BIAS_WARNING )) +dd_dev_info (dd,"%s: Cable TX channel 1/2 bias too high\n" , + __func__);if ((qsfp_interrupt_status[5 ] &QSFP_LOW_BIAS_ALARM ) || - (qsfp_interrupt_status[5 ] &QSFP_LOW_BIAS_WARNING )) -dd_dev_info (dd, -"%s: Cable TX channel 1/2 bias too low\n" , - __func__); + (qsfp_interrupt_status[5 ] &QSFP_LOW_BIAS_WARNING )) +dd_dev_info (dd,"%s: Cable TX channel 1/2 bias too low\n" , + __func__);if ((qsfp_interrupt_status[6 ] &QSFP_HIGH_BIAS_ALARM ) || - (qsfp_interrupt_status[6 ] &QSFP_HIGH_BIAS_WARNING )) -dd_dev_info (dd, -"%s: Cable TX channel 3/4 bias too high\n" , - __func__); + (qsfp_interrupt_status[6 ] &QSFP_HIGH_BIAS_WARNING )) +dd_dev_info (dd,"%s: Cable TX channel 3/4 bias too high\n" , + __func__);if ((qsfp_interrupt_status[6 ] &QSFP_LOW_BIAS_ALARM ) || - (qsfp_interrupt_status[6 ] &QSFP_LOW_BIAS_WARNING )) -dd_dev_info (dd, -"%s: Cable TX channel 3/4 bias too low\n" , - __func__); + (qsfp_interrupt_status[6 ] &QSFP_LOW_BIAS_WARNING )) +dd_dev_info (dd,"%s: Cable TX channel 3/4 bias too low\n" , + __func__);if ((qsfp_interrupt_status[7 ] &QSFP_HIGH_POWER_ALARM ) || - (qsfp_interrupt_status[7 ] &QSFP_HIGH_POWER_WARNING )) -dd_dev_info (dd, -"%s: Cable TX channel 1/2 power too high\n" , - __func__); + (qsfp_interrupt_status[7 ] &QSFP_HIGH_POWER_WARNING )) +dd_dev_info (dd,"%s: Cable TX channel 1/2 power too high\n" , + __func__);if ((qsfp_interrupt_status[7 ] &QSFP_LOW_POWER_ALARM ) || - (qsfp_interrupt_status[7 ] &QSFP_LOW_POWER_WARNING )) -dd_dev_info (dd, -"%s: Cable TX channel 1/2 power too low\n" , - __func__); + (qsfp_interrupt_status[7 ] &QSFP_LOW_POWER_WARNING )) +dd_dev_info (dd,"%s: Cable TX channel 1/2 power too low\n" , + __func__);if ((qsfp_interrupt_status[8 ] &QSFP_HIGH_POWER_ALARM ) || - (qsfp_interrupt_status[8 ] &QSFP_HIGH_POWER_WARNING )) -dd_dev_info (dd, -"%s: Cable TX channel 3/4 power too high\n" , - __func__); + (qsfp_interrupt_status[8 ] &QSFP_HIGH_POWER_WARNING )) +dd_dev_info (dd,"%s: Cable TX channel 3/4 power too high\n" , + __func__);if ((qsfp_interrupt_status[8 ] &QSFP_LOW_POWER_ALARM ) || - (qsfp_interrupt_status[8 ] &QSFP_LOW_POWER_WARNING )) -dd_dev_info (dd, -"%s: Cable TX channel 3/4 power too low\n" , - __func__); + (qsfp_interrupt_status[8 ] &QSFP_LOW_POWER_WARNING )) +dd_dev_info (dd,"%s: Cable TX channel 3/4 power too low\n" , + __func__);/* Bytes 9-10 and 11-12 are reserved */ /* Bytes 13-15 are vendor specific */
@@ -9298,8 +9277,8 @@ void qsfp_event(struct work_struct *work)if (qsfp_read (ppd, dd->hfi1_id,6 , &qsfp_interrupt_status[0 ],16 ) !=16 ) {dd_dev_info (dd, -"%s: Failed to read status of QSFP module\n" , - __func__); +"%s: Failed to read status of QSFP module\n" , + __func__); }else {unsigned long flags;
@@ -9308,7 +9287,7 @@ void qsfp_event(struct work_struct *work)spin_lock_irqsave (&ppd->qsfp_info.qsfp_lock, flags); ppd->qsfp_info.check_interrupt_flags =0 ;spin_unlock_irqrestore (&ppd->qsfp_info.qsfp_lock, - flags); + flags); } } }
@@ -9430,7 +9409,7 @@ void hfi1_quiet_serdes(struct hfi1_pportdata *ppd) ppd->offline_disabled_reason =HFI1_ODR_MASK (OPA_LINKDOWN_REASON_SMA_DISABLED );set_link_down_reason (ppd,OPA_LINKDOWN_REASON_SMA_DISABLED ,0 , -OPA_LINKDOWN_REASON_SMA_DISABLED ); +OPA_LINKDOWN_REASON_SMA_DISABLED );set_link_state (ppd,HLS_DN_OFFLINE );/* disable the port */
@@ -9486,8 +9465,8 @@ void hfi1_put_tid(struct hfi1_devdata *dd, u32 index, pa =0 ; }else if (type >PT_INVALID ) {dd_dev_err (dd, -"unexpected receive array type %u for index %u, not handled\n" , - type, index); +"unexpected receive array type %u for index %u, not handled\n" , + type, index); goto done; }
@@ -9702,12 +9681,15 @@ static void set_send_length(struct hfi1_pportdata *ppd)/* all kernel receive contexts have the same hdrqentsize */ for (i =0 ; i < ppd->vls_supported; i++) {sc_set_cr_threshold (dd->vld[i].sc, -sc_mtu_to_threshold (dd->vld[i].sc, dd->vld[i].mtu, - dd->rcd[0 ]->rcvhdrqentsize)); +sc_mtu_to_threshold (dd->vld[i].sc, + dd->vld[i].mtu, + dd->rcd[0 ]-> + rcvhdrqentsize)); }sc_set_cr_threshold (dd->vld[15 ].sc, -sc_mtu_to_threshold (dd->vld[15 ].sc, dd->vld[15 ].mtu, - dd->rcd[0 ]->rcvhdrqentsize)); +sc_mtu_to_threshold (dd->vld[15 ].sc, + dd->vld[15 ].mtu, + dd->rcd[0 ]->rcvhdrqentsize));/* Adjust maximum MTU for the port in DC */ dcmtu = maxvlmtu == 10240 ? DCC_CFG_PORT_MTU_CAP_10240 :
@@ -9768,8 +9750,8 @@ static int wait_phy_linkstate(struct hfi1_devdata *dd, u32 state, u32 msecs)break ;if (time_after (jiffies, timeout)) {dd_dev_err (dd, -"timeout waiting for phy link state 0x%x, current state is 0x%x\n" , - state, curr_state); +"timeout waiting for phy link state 0x%x, current state is 0x%x\n" , + state, curr_state);return -ETIMEDOUT ; }usleep_range (1950 ,2050 );/* sleep 2ms-ish */
@@ -9812,12 +9794,12 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason)if (do_transition) { ret =set_physical_link_state (dd, -PLS_OFFLINE | (rem_reason <<8 )); +PLS_OFFLINE | (rem_reason <<8 ));if (ret !=HCMD_SUCCESS ) {dd_dev_err (dd, -"Failed to transition to Offline link state, return %d\n" , - ret); +"Failed to transition to Offline link state, return %d\n" , + ret);return -EINVAL ; } if (ppd->offline_disabled_reason ==
@@ -9862,7 +9844,7 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason) ret =wait_fm_ready (dd,7000 );if (ret) {dd_dev_err (dd, -"After going offline, timed out waiting for the 8051 to become ready to accept host requests\n" ); +"After going offline, timed out waiting for the 8051 to become ready to accept host requests\n" );/* state is really offline, so make it so */ ppd->host_link_state =HLS_DN_OFFLINE ;return ret;
@@ -9885,8 +9867,8 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason)read_last_local_state (dd, &last_local_state);read_last_remote_state (dd, &last_remote_state);dd_dev_err (dd, -"LNI failure last states: local 0x%08x, remote 0x%08x\n" , - last_local_state, last_remote_state); +"LNI failure last states: local 0x%08x, remote 0x%08x\n" , + last_local_state, last_remote_state); }/* the active link width (downgrade) is 0 on link down */
@@ -10038,10 +10020,10 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state) state ==HLS_DN_POLL ;dd_dev_info (dd,"%s: current %s, new %s %s%s\n" , __func__, -link_state_name (ppd->host_link_state), -link_state_name (orig_new_state), - poll_bounce ?"(bounce) " :"" , -link_state_reason_name (ppd, state)); +link_state_name (ppd->host_link_state), +link_state_name (orig_new_state), + poll_bounce ?"(bounce) " :"" , +link_state_reason_name (ppd, state)); was_up = !!(ppd->host_link_state &HLS_UP );
@@ -10071,7 +10053,7 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)* simulator jumps from polling to link up. * Accept that here. */ -/* OK */ ; +/* OK */ }else if (ppd->host_link_state !=HLS_GOING_UP ) { goto unexpected; }
@@ -10082,8 +10064,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)/* logical state didn't change, stay at going_up */ ppd->host_link_state =HLS_GOING_UP ;dd_dev_err (dd, -"%s: logical state did not change to INIT\n" , - __func__); +"%s: logical state did not change to INIT\n" , + __func__); }else {/* clear old transient LINKINIT_REASON code */ if (ppd->linkinit_reason >=OPA_LINKINIT_REASON_CLEAR )
@@ -10107,8 +10089,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)/* logical state didn't change, stay at init */ ppd->host_link_state =HLS_UP_INIT ;dd_dev_err (dd, -"%s: logical state did not change to ARMED\n" , - __func__); +"%s: logical state did not change to ARMED\n" , + __func__); }/* * The simulator does not currently implement SMA messages,
@@ -10129,8 +10111,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)/* logical state didn't change, stay at armed */ ppd->host_link_state =HLS_UP_ARMED ;dd_dev_err (dd, -"%s: logical state did not change to ACTIVE\n" , - __func__); +"%s: logical state did not change to ACTIVE\n" , + __func__); }else {/* tell all engines to go running */ sdma_all_running (dd);
@@ -10178,8 +10160,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state) ret1 =set_physical_link_state (dd,PLS_POLLING );if (ret1 !=HCMD_SUCCESS ) {dd_dev_err (dd, -"Failed to transition to Polling link state, return 0x%x\n" , - ret1); +"Failed to transition to Polling link state, return 0x%x\n" , + ret1); ret = -EINVAL ; } }
@@ -10209,8 +10191,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state) ret1 =set_physical_link_state (dd,PLS_DISABLED );if (ret1 !=HCMD_SUCCESS ) {dd_dev_err (dd, -"Failed to transition to Disabled link state, return 0x%x\n" , - ret1); +"Failed to transition to Disabled link state, return 0x%x\n" , + ret1); ret = -EINVAL ;break ; }
@@ -10238,8 +10220,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state) ret1 =set_physical_link_state (dd,PLS_LINKUP );if (ret1 !=HCMD_SUCCESS ) {dd_dev_err (dd, -"Failed to transition to link up state, return 0x%x\n" , - ret1); +"Failed to transition to link up state, return 0x%x\n" , + ret1); ret = -EINVAL ;break ; }
@@ -10250,7 +10232,7 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)case HLS_LINK_COOLDOWN :/* transient within goto_offline() */ default :dd_dev_info (dd,"%s: state 0x%x: not supported\n" , - __func__, state); + __func__, state); ret = -EINVAL ;break ; }
@@ -10270,8 +10252,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state) unexpected:dd_dev_err (dd,"%s: unexpected state transition from %s to %s\n" , - __func__,link_state_name (ppd->host_link_state), -link_state_name (state)); + __func__,link_state_name (ppd->host_link_state), +link_state_name (state)); ret = -EINVAL ; done:
@@ -10359,8 +10341,8 @@ int hfi1_set_ib_cfg(struct hfi1_pportdata *ppd, int which, u32 val)default :if (HFI1_CAP_IS_KSET (PRINT_UNIMPL ))dd_dev_info (ppd->dd, -"%s: which %s, val 0x%x: not implemented\n" , - __func__,ib_cfg_name (which), val); +"%s: which %s, val 0x%x: not implemented\n" , + __func__,ib_cfg_name (which), val);break ; }return ret;
@@ -10569,41 +10551,41 @@ static void get_vlarb_preempt(struct hfi1_devdata *dd, u32 nelems,static void set_sc2vlnt (struct hfi1_devdata *dd,struct sc2vlnt *dp) {write_csr (dd,DCC_CFG_SC_VL_TABLE_15_0 , - DC_SC_VL_VAL(15_0, -0 , dp->vlnt[0 ] &0xf , -1 , dp->vlnt[1 ] &0xf , -2 , dp->vlnt[2 ] &0xf , -3 , dp->vlnt[3 ] &0xf , -4 , dp->vlnt[4 ] &0xf , -5 , dp->vlnt[5 ] &0xf , -6 , dp->vlnt[6 ] &0xf , -7 , dp->vlnt[7 ] &0xf , -8 , dp->vlnt[8 ] &0xf , -9 , dp->vlnt[9 ] &0xf , -10 , dp->vlnt[10 ] &0xf , -11 , dp->vlnt[11 ] &0xf , -12 , dp->vlnt[12 ] &0xf , -13 , dp->vlnt[13 ] &0xf , -14 , dp->vlnt[14 ] &0xf , -15 , dp->vlnt[15 ] &0xf )); + DC_SC_VL_VAL(15_0, +0 , dp->vlnt[0 ] &0xf , +1 , dp->vlnt[1 ] &0xf , +2 , dp->vlnt[2 ] &0xf , +3 , dp->vlnt[3 ] &0xf , +4 , dp->vlnt[4 ] &0xf , +5 , dp->vlnt[5 ] &0xf , +6 , dp->vlnt[6 ] &0xf , +7 , dp->vlnt[7 ] &0xf , +8 , dp->vlnt[8 ] &0xf , +9 , dp->vlnt[9 ] &0xf , +10 , dp->vlnt[10 ] &0xf , +11 , dp->vlnt[11 ] &0xf , +12 , dp->vlnt[12 ] &0xf , +13 , dp->vlnt[13 ] &0xf , +14 , dp->vlnt[14 ] &0xf , +15 , dp->vlnt[15 ] &0xf ));write_csr (dd,DCC_CFG_SC_VL_TABLE_31_16 , - DC_SC_VL_VAL(31_16, -16 , dp->vlnt[16 ] &0xf , -17 , dp->vlnt[17 ] &0xf , -18 , dp->vlnt[18 ] &0xf , -19 , dp->vlnt[19 ] &0xf , -20 , dp->vlnt[20 ] &0xf , -21 , dp->vlnt[21 ] &0xf , -22 , dp->vlnt[22 ] &0xf , -23 , dp->vlnt[23 ] &0xf , -24 , dp->vlnt[24 ] &0xf , -25 , dp->vlnt[25 ] &0xf , -26 , dp->vlnt[26 ] &0xf , -27 , dp->vlnt[27 ] &0xf , -28 , dp->vlnt[28 ] &0xf , -29 , dp->vlnt[29 ] &0xf , -30 , dp->vlnt[30 ] &0xf , -31 , dp->vlnt[31 ] &0xf )); + DC_SC_VL_VAL(31_16, +16 , dp->vlnt[16 ] &0xf , +17 , dp->vlnt[17 ] &0xf , +18 , dp->vlnt[18 ] &0xf , +19 , dp->vlnt[19 ] &0xf , +20 , dp->vlnt[20 ] &0xf , +21 , dp->vlnt[21 ] &0xf , +22 , dp->vlnt[22 ] &0xf , +23 , dp->vlnt[23 ] &0xf , +24 , dp->vlnt[24 ] &0xf , +25 , dp->vlnt[25 ] &0xf , +26 , dp->vlnt[26 ] &0xf , +27 , dp->vlnt[27 ] &0xf , +28 , dp->vlnt[28 ] &0xf , +29 , dp->vlnt[29 ] &0xf , +30 , dp->vlnt[30 ] &0xf , +31 , dp->vlnt[31 ] &0xf )); } static void nonzero_msg(struct hfi1_devdata *dd, int idx, const char *what,
@@ -10611,7 +10593,7 @@ static void nonzero_msg(struct hfi1_devdata *dd, int idx, const char *what, {if (limit !=0 )dd_dev_info (dd,"Invalid %s limit %d on VL %d, ignoring\n" , - what, (int )limit, idx); + what, (int )limit, idx); }/* change only the shared limit portion of SendCmGLobalCredit */
@@ -10689,14 +10671,14 @@ static void wait_for_vl_status_clear(struct hfi1_devdata *dd, u64 mask, }dd_dev_err (dd, -"%s credit change status not clearing after %dms, mask 0x%llx, not clear 0x%llx\n" , - which,VL_STATUS_CLEAR_TIMEOUT , mask, reg); +"%s credit change status not clearing after %dms, mask 0x%llx, not clear 0x%llx\n" , + which,VL_STATUS_CLEAR_TIMEOUT , mask, reg);/* * If this occurs, it is likely there was a credit loss on the link. * The only recovery from that is a link bounce. */ dd_dev_err (dd, -"Continuing anyway. A credit loss may occur. Suggest a link bounce\n" ); +"Continuing anyway. A credit loss may occur. Suggest a link bounce\n" ); }/*
@@ -10763,9 +10745,9 @@ int set_buffer_control(struct hfi1_pportdata *ppd,continue ; }nonzero_msg (dd, i,"dedicated" , -be16_to_cpu (new_bc->vl[i].dedicated)); +be16_to_cpu (new_bc->vl[i].dedicated));nonzero_msg (dd, i,"shared" , -be16_to_cpu (new_bc->vl[i].shared)); +be16_to_cpu (new_bc->vl[i].shared)); new_bc->vl[i].dedicated =0 ; new_bc->vl[i].shared =0 ; }
@@ -10836,7 +10818,7 @@ int set_buffer_control(struct hfi1_pportdata *ppd, }wait_for_vl_status_clear (dd, use_all_mask ? all_mask : changing_mask, -"shared" ); +"shared" );if (change_count >0 ) {for (i =0 ; i <NUM_USABLE_VLS ; i++) {
@@ -10845,7 +10827,8 @@ int set_buffer_control(struct hfi1_pportdata *ppd,if (lowering_dedicated[i]) {set_vl_dedicated (dd, i, -be16_to_cpu (new_bc->vl[i].dedicated)); +be16_to_cpu (new_bc-> + vl[i].dedicated)); cur_bc.vl[i].dedicated = new_bc->vl[i].dedicated; }
@@ -10861,7 +10844,8 @@ int set_buffer_control(struct hfi1_pportdata *ppd,if (be16_to_cpu (new_bc->vl[i].dedicated) >be16_to_cpu (cur_bc.vl[i].dedicated))set_vl_dedicated (dd, i, -be16_to_cpu (new_bc->vl[i].dedicated)); +be16_to_cpu (new_bc-> + vl[i].dedicated)); } }
@@ -10877,9 +10861,9 @@ int set_buffer_control(struct hfi1_pportdata *ppd,/* finally raise the global shared */ if (be16_to_cpu (new_bc->overall_shared_limit) > -be16_to_cpu (cur_bc.overall_shared_limit)) +be16_to_cpu (cur_bc.overall_shared_limit))set_global_shared (dd, -be16_to_cpu (new_bc->overall_shared_limit)); +be16_to_cpu (new_bc->overall_shared_limit));/* bracket the credit change with a total adjustment */ if (new_total < cur_total)
@@ -11152,7 +11136,8 @@ static void adjust_rcv_timeout(struct hfi1_ctxtdata *rcd, u32 npkts)* been verified to be in range */ write_kctxt_csr (dd, rcd->ctxt,RCV_AVAIL_TIME_OUT , - (u64 )timeout <<RCV_AVAIL_TIME_OUT_TIME_OUT_RELOAD_SHIFT ); + (u64 )timeout << +RCV_AVAIL_TIME_OUT_TIME_OUT_RELOAD_SHIFT ); } void update_usrhead(struct hfi1_ctxtdata *rcd, u32 hd, u32 updegr, u32 egrhd,
@@ -11370,14 +11355,14 @@ void hfi1_rcvctrl(struct hfi1_devdata *dd, unsigned int op, int ctxt) reg =read_kctxt_csr (dd, ctxt,RCV_CTXT_STATUS );if (reg !=0 ) {dd_dev_info (dd,"ctxt %d status %lld (blocked)\n" , - ctxt, reg); + ctxt, reg);read_uctxt_csr (dd, ctxt,RCV_HDR_HEAD );write_uctxt_csr (dd, ctxt,RCV_HDR_HEAD ,0x10 );write_uctxt_csr (dd, ctxt,RCV_HDR_HEAD ,0x00 );read_uctxt_csr (dd, ctxt,RCV_HDR_HEAD ); reg =read_kctxt_csr (dd, ctxt,RCV_CTXT_STATUS );dd_dev_info (dd,"ctxt %d status %lld (%s blocked)\n" , - ctxt, reg, reg ==0 ?"not" :"still" ); + ctxt, reg, reg ==0 ?"not" :"still" ); } }
@@ -11388,7 +11373,7 @@ void hfi1_rcvctrl(struct hfi1_devdata *dd, unsigned int op, int ctxt)*/ /* set interrupt timeout */ write_kctxt_csr (dd, ctxt,RCV_AVAIL_TIME_OUT , - (u64 )rcd->rcvavail_timeout << + (u64 )rcd->rcvavail_timeout <<RCV_AVAIL_TIME_OUT_TIME_OUT_RELOAD_SHIFT );/* set RcvHdrHead.Counter, zero RcvHdrHead.Head (again) */
@@ -11863,8 +11848,7 @@ static int init_cntrs(struct hfi1_devdata *dd) dev_cntrs[i].offset = dd->ndevcntrs;for (j =0 ; j <C_VL_COUNT ; j++) {snprintf (name,C_MAX_NAME ,"%s%d" , - dev_cntrs[i].name, -vl_from_idx (j)); + dev_cntrs[i].name,vl_from_idx (j)); sz +=strlen (name);/* Add ",32" for 32-bit counters */ if (dev_cntrs[i].flags &CNTR_32BIT )
@@ -11987,8 +11971,7 @@ static int init_cntrs(struct hfi1_devdata *dd) port_cntrs[i].offset = dd->nportcntrs;for (j =0 ; j <C_VL_COUNT ; j++) {snprintf (name,C_MAX_NAME ,"%s%d" , - port_cntrs[i].name, -vl_from_idx (j)); + port_cntrs[i].name,vl_from_idx (j)); sz +=strlen (name);/* Add ",32" for 32-bit counters */ if (port_cntrs[i].flags &CNTR_32BIT )
@@ -12021,8 +12004,7 @@ static int init_cntrs(struct hfi1_devdata *dd)if (port_cntrs[i].flags &CNTR_VL ) {for (j =0 ; j <C_VL_COUNT ; j++) {snprintf (name,C_MAX_NAME ,"%s%d" , - port_cntrs[i].name, -vl_from_idx (j)); + port_cntrs[i].name,vl_from_idx (j));memcpy (p, name,strlen (name)); p +=strlen (name);
@@ -12077,8 +12059,8 @@ static u32 chip_to_opa_lstate(struct hfi1_devdata *dd, u32 chip_lstate)switch (chip_lstate) {default :dd_dev_err (dd, -"Unknown logical state 0x%x, reporting IB_PORT_DOWN\n" , - chip_lstate); +"Unknown logical state 0x%x, reporting IB_PORT_DOWN\n" , + chip_lstate);/* fall through */ case LSTATE_DOWN :return IB_PORT_DOWN ;
@@ -12097,7 +12079,7 @@ u32 chip_to_opa_pstate(struct hfi1_devdata *dd, u32 chip_pstate)switch (chip_pstate &0xf0 ) {default :dd_dev_err (dd,"Unexpected chip physical state of 0x%x\n" , - chip_pstate); + chip_pstate);/* fall through */ case PLS_DISABLED :return IB_PORTPHYSSTATE_DISABLED ;
@@ -12163,7 +12145,7 @@ u32 get_logical_state(struct hfi1_pportdata *ppd) new_state =chip_to_opa_lstate (ppd->dd,read_logical_state (ppd->dd));if (new_state != ppd->lstate) {dd_dev_info (ppd->dd,"logical state changed to %s (0x%x)\n" , -opa_lstate_name (new_state), new_state); +opa_lstate_name (new_state), new_state); ppd->lstate = new_state; }/*
@@ -12229,9 +12211,9 @@ u8 hfi1_ibphys_portstate(struct hfi1_pportdata *ppd) ib_pstate =chip_to_opa_pstate (ppd->dd, pstate);if (ppd->last_pstate != ib_pstate) {dd_dev_info (ppd->dd, -"%s: physical state changed to %s (0x%x), phy 0x%x\n" , - __func__,opa_pstate_name (ib_pstate), ib_pstate, - pstate); +"%s: physical state changed to %s (0x%x), phy 0x%x\n" , + __func__,opa_pstate_name (ib_pstate), ib_pstate, + pstate); ppd->last_pstate = ib_pstate; }return ib_pstate;
@@ -12449,11 +12431,11 @@ static void remap_sdma_interrupts(struct hfi1_devdata *dd,* SDMAIdle */ remap_intr (dd,IS_SDMA_START +0 *TXE_NUM_SDMA_ENGINES + engine, - msix_intr); + msix_intr);remap_intr (dd,IS_SDMA_START +1 *TXE_NUM_SDMA_ENGINES + engine, - msix_intr); + msix_intr);remap_intr (dd,IS_SDMA_START +2 *TXE_NUM_SDMA_ENGINES + engine, - msix_intr); + msix_intr); }static int request_intx_irq (struct hfi1_devdata *dd)
@@ -12463,10 +12445,10 @@ static int request_intx_irq(struct hfi1_devdata *dd)snprintf (dd->intx_name,sizeof (dd->intx_name),DRIVER_NAME "_%d" , dd->unit); ret =request_irq (dd->pcidev->irq, general_interrupt, -IRQF_SHARED , dd->intx_name, dd); +IRQF_SHARED , dd->intx_name, dd);if (ret)dd_dev_err (dd,"unable to request INTx interrupt, err %d\n" , - ret); + ret);else dd->requested_intx_irq =1 ;return ret;
@@ -12549,7 +12531,7 @@ static int request_msix_irqs(struct hfi1_devdata *dd)* ignore it */ dd_dev_err (dd, -"Unexpected extra MSI-X interrupt %d\n" , i); +"Unexpected extra MSI-X interrupt %d\n" , i);continue ; }/* no argument, no interrupt */
@@ -12559,11 +12541,11 @@ static int request_msix_irqs(struct hfi1_devdata *dd) me->name[sizeof (me->name) -1 ] =0 ; ret =request_threaded_irq (me->msix.vector, handler, thread,0 , - me->name, arg); + me->name, arg);if (ret) {dd_dev_err (dd, -"unable to allocate %s interrupt, vector %d, index %d, err %d\n" , - err_info, me->msix.vector, idx, ret); +"unable to allocate %s interrupt, vector %d, index %d, err %d\n" , + err_info, me->msix.vector, idx, ret);return ret; }/*
@@ -12748,11 +12730,11 @@ static int set_up_context_variables(struct hfi1_devdata *dd) dd->num_user_contexts = num_user_contexts; dd->freectxts = num_user_contexts;dd_dev_info (dd, -"rcv contexts: chip %d, used %d (kernel %d, user %d)\n" , - (int )dd->chip_rcv_contexts, - (int )dd->num_rcv_contexts, - (int )dd->n_krcv_queues, - (int )dd->num_rcv_contexts - dd->n_krcv_queues); +"rcv contexts: chip %d, used %d (kernel %d, user %d)\n" , + (int )dd->chip_rcv_contexts, + (int )dd->num_rcv_contexts, + (int )dd->n_krcv_queues, + (int )dd->num_rcv_contexts - dd->n_krcv_queues);/* * Receive array allocation:
@@ -12778,8 +12760,8 @@ static int set_up_context_variables(struct hfi1_devdata *dd) dd->rcv_entries.ngroups = (MAX_EAGER_ENTRIES *2 ) / dd->rcv_entries.group_size;dd_dev_info (dd, -"RcvArray group count too high, change to %u\n" , - dd->rcv_entries.ngroups); +"RcvArray group count too high, change to %u\n" , + dd->rcv_entries.ngroups); dd->rcv_entries.nctxt_extra =0 ; }/*
@@ -12871,7 +12853,7 @@ static void write_uninitialized_csrs_and_memories(struct hfi1_devdata *dd)/* RcvArray */ for (i =0 ; i < dd->chip_rcv_array_count; i++)write_csr (dd,RCV_ARRAY + (8 * i), -RCV_ARRAY_RT_WRITE_ENABLE_SMASK ); +RCV_ARRAY_RT_WRITE_ENABLE_SMASK );/* RcvQPMapTable */ for (i =0 ; i <32 ; i++)
@@ -12903,8 +12885,8 @@ static void clear_cce_status(struct hfi1_devdata *dd, u64 status_bits,return ;if (time_after (jiffies, timeout)) {dd_dev_err (dd, -"Timeout waiting for CceStatus to clear bits 0x%llx, remaining 0x%llx\n" , - status_bits, reg & status_bits); +"Timeout waiting for CceStatus to clear bits 0x%llx, remaining 0x%llx\n" , + status_bits, reg & status_bits);return ; }udelay (1 );
@@ -12936,7 +12918,7 @@ static void reset_cce_csrs(struct hfi1_devdata *dd)for (i =0 ; i <CCE_NUM_MSIX_VECTORS ; i++) {write_csr (dd,CCE_MSIX_TABLE_LOWER + (8 * i),0 );write_csr (dd,CCE_MSIX_TABLE_UPPER + (8 * i), -CCE_MSIX_TABLE_UPPER_RESETCSR ); +CCE_MSIX_TABLE_UPPER_RESETCSR ); }for (i =0 ; i <CCE_NUM_MSIX_PBAS ; i++) {/* CCE_MSIX_PBA read-only */
@@ -13120,8 +13102,7 @@ static void reset_txe_csrs(struct hfi1_devdata *dd)for (i =0 ; i <TXE_NUM_64_BIT_COUNTER ; i++)write_csr (dd,SEND_COUNTER_ARRAY64 + (8 * i),0 );write_csr (dd,SEND_CM_CTRL ,SEND_CM_CTRL_RESETCSR ); -write_csr (dd,SEND_CM_GLOBAL_CREDIT , -SEND_CM_GLOBAL_CREDIT_RESETCSR ); +write_csr (dd,SEND_CM_GLOBAL_CREDIT ,SEND_CM_GLOBAL_CREDIT_RESETCSR );/* SEND_CM_CREDIT_USED_STATUS read-only */ write_csr (dd,SEND_CM_TIMER_CTRL ,0 );write_csr (dd,SEND_CM_LOCAL_AU_TABLE0_TO3 ,0 );
@@ -13215,8 +13196,8 @@ static void init_rbufs(struct hfi1_devdata *dd)*/ if (count++ >500 ) {dd_dev_err (dd, -"%s: in-progress DMA not clearing: RcvStatus 0x%llx, continuing\n" , - __func__, reg); +"%s: in-progress DMA not clearing: RcvStatus 0x%llx, continuing\n" , + __func__, reg);break ; }udelay (2 );/* do not busy-wait the CSR */
@@ -13245,8 +13226,8 @@ static void init_rbufs(struct hfi1_devdata *dd)/* give up after 100us - slowest possible at 33MHz is 73us */ if (count++ >50 ) {dd_dev_err (dd, -"%s: RcvStatus.RxRbufInit not set, continuing\n" , - __func__); +"%s: RcvStatus.RxRbufInit not set, continuing\n" , + __func__);break ; } }
@@ -13272,7 +13253,7 @@ static void reset_rxe_csrs(struct hfi1_devdata *dd)write_csr (dd,RCV_VL15 ,0 );/* this is a clear-down */ write_csr (dd,RCV_ERR_INFO , -RCV_ERR_INFO_RCV_EXCESS_BUFFER_OVERRUN_SMASK ); +RCV_ERR_INFO_RCV_EXCESS_BUFFER_OVERRUN_SMASK );/* RCV_ERR_STATUS read-only */ write_csr (dd,RCV_ERR_MASK ,0 );write_csr (dd,RCV_ERR_CLEAR , ~0ull );
@@ -13318,8 +13299,8 @@ static void reset_rxe_csrs(struct hfi1_devdata *dd)write_uctxt_csr (dd, i,RCV_EGR_INDEX_HEAD ,0 );/* RCV_EGR_OFFSET_TAIL read-only */ for (j =0 ; j <RXE_NUM_TID_FLOWS ; j++) { -write_uctxt_csr (dd, i,RCV_TID_FLOW_TABLE + (8 * j), -0 ); +write_uctxt_csr (dd, i, +RCV_TID_FLOW_TABLE + (8 * j),0 ); } } }
@@ -13519,12 +13500,12 @@ static void init_kdeth_qp(struct hfi1_devdata *dd) kdeth_qp =DEFAULT_KDETH_QP ;write_csr (dd,SEND_BTH_QP , - (kdeth_qp &SEND_BTH_QP_KDETH_QP_MASK ) - <<SEND_BTH_QP_KDETH_QP_SHIFT ); + (kdeth_qp &SEND_BTH_QP_KDETH_QP_MASK ) << +SEND_BTH_QP_KDETH_QP_SHIFT );write_csr (dd,RCV_BTH_QP , - (kdeth_qp &RCV_BTH_QP_KDETH_QP_MASK ) - <<RCV_BTH_QP_KDETH_QP_SHIFT ); + (kdeth_qp &RCV_BTH_QP_KDETH_QP_MASK ) << +RCV_BTH_QP_KDETH_QP_SHIFT ); }/**
@@ -13649,22 +13630,21 @@ static void init_qos(struct hfi1_devdata *dd, u32 first_ctxt)write_csr (dd,RCV_RSM_MAP_TABLE + (8 * i), rsmmap[i]);/* add rule0 */ write_csr (dd,RCV_RSM_CFG /* + (8 * 0) */ , -RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_MASK - <<RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_SHIFT | -2ull <<RCV_RSM_CFG_PACKET_TYPE_SHIFT ); +RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_MASK << +RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_SHIFT | +2ull <<RCV_RSM_CFG_PACKET_TYPE_SHIFT );write_csr (dd,RCV_RSM_SELECT /* + (8 * 0) */ , -LRH_BTH_MATCH_OFFSET - <<RCV_RSM_SELECT_FIELD1_OFFSET_SHIFT | -LRH_SC_MATCH_OFFSET <<RCV_RSM_SELECT_FIELD2_OFFSET_SHIFT | -LRH_SC_SELECT_OFFSET <<RCV_RSM_SELECT_INDEX1_OFFSET_SHIFT | - ((u64 )n) <<RCV_RSM_SELECT_INDEX1_WIDTH_SHIFT | -QPN_SELECT_OFFSET <<RCV_RSM_SELECT_INDEX2_OFFSET_SHIFT | - ((u64 )m + (u64 )n) <<RCV_RSM_SELECT_INDEX2_WIDTH_SHIFT ); +LRH_BTH_MATCH_OFFSET <<RCV_RSM_SELECT_FIELD1_OFFSET_SHIFT | +LRH_SC_MATCH_OFFSET <<RCV_RSM_SELECT_FIELD2_OFFSET_SHIFT | +LRH_SC_SELECT_OFFSET <<RCV_RSM_SELECT_INDEX1_OFFSET_SHIFT | + ((u64 )n) <<RCV_RSM_SELECT_INDEX1_WIDTH_SHIFT | +QPN_SELECT_OFFSET <<RCV_RSM_SELECT_INDEX2_OFFSET_SHIFT | + ((u64 )m + (u64 )n) <<RCV_RSM_SELECT_INDEX2_WIDTH_SHIFT );write_csr (dd,RCV_RSM_MATCH /* + (8 * 0) */ , -LRH_BTH_MASK <<RCV_RSM_MATCH_MASK1_SHIFT | -LRH_BTH_VALUE <<RCV_RSM_MATCH_VALUE1_SHIFT | -LRH_SC_MASK <<RCV_RSM_MATCH_MASK2_SHIFT | -LRH_SC_VALUE <<RCV_RSM_MATCH_VALUE2_SHIFT ); +LRH_BTH_MASK <<RCV_RSM_MATCH_MASK1_SHIFT | +LRH_BTH_VALUE <<RCV_RSM_MATCH_VALUE1_SHIFT | +LRH_SC_MASK <<RCV_RSM_MATCH_MASK2_SHIFT | +LRH_SC_VALUE <<RCV_RSM_MATCH_VALUE2_SHIFT );/* Enable RSM */ add_rcvctrl (dd,RCV_CTRL_RCV_RSM_ENABLE_SMASK );kfree (rsmmap);
@@ -13682,9 +13662,8 @@ static void init_rxe(struct hfi1_devdata *dd)/* enable all receive errors */ write_csr (dd,RCV_ERR_MASK , ~0ull );/* setup QPN map table - start where VL15 context leaves off */ -init_qos ( - dd, - dd->n_krcv_queues >MIN_KERNEL_KCTXTS ?MIN_KERNEL_KCTXTS :0 ); +init_qos (dd, dd->n_krcv_queues >MIN_KERNEL_KCTXTS ? +MIN_KERNEL_KCTXTS :0 );/* * make sure RcvCtrl.RcvWcb <= PCIe Device Control * Register Max_Payload_Size (PCI_EXP_DEVCTL in Linux PCIe config
@@ -13721,35 +13700,33 @@ static void assign_cm_au_table(struct hfi1_devdata *dd, u32 cu, u32 csr0to3, u32 csr4to7) {write_csr (dd ,csr0to3 , - 0ull << -SEND_CM_LOCAL_AU_TABLE0_TO3_LOCAL_AU_TABLE0_SHIFT - | 1ull << - SEND_CM_LOCAL_AU_TABLE0_TO3_LOCAL_AU_TABLE1_SHIFT - | 2ull * cu << - SEND_CM_LOCAL_AU_TABLE0_TO3_LOCAL_AU_TABLE2_SHIFT - | 4ull * cu << -SEND_CM_LOCAL_AU_TABLE0_TO3_LOCAL_AU_TABLE3_SHIFT ); + 0ull << SEND_CM_LOCAL_AU_TABLE0_TO3_LOCAL_AU_TABLE0_SHIFT | + 1ull << SEND_CM_LOCAL_AU_TABLE0_TO3_LOCAL_AU_TABLE1_SHIFT | + 2ull * cu << + SEND_CM_LOCAL_AU_TABLE0_TO3_LOCAL_AU_TABLE2_SHIFT | + 4ull * cu << +SEND_CM_LOCAL_AU_TABLE0_TO3_LOCAL_AU_TABLE3_SHIFT );write_csr (dd, csr4to7, -8ull * cu << -SEND_CM_LOCAL_AU_TABLE4_TO7_LOCAL_AU_TABLE4_SHIFT - |16ull * cu << -SEND_CM_LOCAL_AU_TABLE4_TO7_LOCAL_AU_TABLE5_SHIFT - |32ull * cu << -SEND_CM_LOCAL_AU_TABLE4_TO7_LOCAL_AU_TABLE6_SHIFT - |64ull * cu << -SEND_CM_LOCAL_AU_TABLE4_TO7_LOCAL_AU_TABLE7_SHIFT ); +8ull * cu << +SEND_CM_LOCAL_AU_TABLE4_TO7_LOCAL_AU_TABLE4_SHIFT | +16ull * cu << +SEND_CM_LOCAL_AU_TABLE4_TO7_LOCAL_AU_TABLE5_SHIFT | +32ull * cu << +SEND_CM_LOCAL_AU_TABLE4_TO7_LOCAL_AU_TABLE6_SHIFT | +64ull * cu << +SEND_CM_LOCAL_AU_TABLE4_TO7_LOCAL_AU_TABLE7_SHIFT ); }static void assign_local_cm_au_table (struct hfi1_devdata *dd,u8 vcu) {assign_cm_au_table (dd,vcu_to_cu (vcu),SEND_CM_LOCAL_AU_TABLE0_TO3 , -SEND_CM_LOCAL_AU_TABLE4_TO7 ); +SEND_CM_LOCAL_AU_TABLE4_TO7 ); }void assign_remote_cm_au_table (struct hfi1_devdata *dd,u8 vcu) {assign_cm_au_table (dd,vcu_to_cu (vcu),SEND_CM_REMOTE_AU_TABLE0_TO3 , -SEND_CM_REMOTE_AU_TABLE4_TO7 ); +SEND_CM_REMOTE_AU_TABLE4_TO7 ); }static void init_txe (struct hfi1_devdata *dd)
@@ -13995,8 +13972,8 @@ struct hfi1_devdata *hfi1_init_dd(struct pci_dev *pdev, "Functional simulator" }; - dd =hfi1_alloc_devdata (pdev, -NUM_IB_PORTS *sizeof (struct hfi1_pportdata )); + dd =hfi1_alloc_devdata (pdev,NUM_IB_PORTS * +sizeof (struct hfi1_pportdata ));if (IS_ERR (dd)) goto bail; ppd = dd->pport;
@@ -14083,8 +14060,8 @@ struct hfi1_devdata *hfi1_init_dd(struct pci_dev *pdev, dd->icode = reg >>CCE_REVISION2_IMPL_CODE_SHIFT ; dd->irev = reg >>CCE_REVISION2_IMPL_REVISION_SHIFT ;dd_dev_info (dd,"Implementation: %s, revision 0x%x\n" , - dd->icode <ARRAY_SIZE (inames) ? inames[dd->icode] :"unknown" , - (int )dd->irev); + dd->icode <ARRAY_SIZE (inames) ? + inames[dd->icode] :"unknown" , (int )dd->irev);/* speeds the hardware can support */ dd->pport->link_speed_supported =OPA_LINK_SPEED_25G ;
drivers/staging/rdma/hfi1/debugfs.c +17 -17
@@ -150,8 +150,8 @@ static int _opcode_stats_seq_show(struct seq_file *s, void *v)if (!n_packets && !n_bytes)return SEQ_SKIP ;seq_printf (s,"%02llx %llu/%llu\n" , i, - (unsigned long long )n_packets, - (unsigned long long )n_bytes); + (unsigned long long )n_packets, + (unsigned long long )n_bytes);return 0 ; }
@@ -246,7 +246,7 @@ __acquires(RCU) }static void *_qp_stats_seq_next (struct seq_file *s,void *iter_ptr, -loff_t *pos) +loff_t *pos) {struct qp_iter *iter = iter_ptr;
@@ -392,7 +392,7 @@ static ssize_t portnames_read(struct file *file, char __user *buf,/* read the per-port counters */ static ssize_t portcntrs_debugfs_read (struct file *file,char __user *buf, -size_t count,loff_t *ppos) +size_t count,loff_t *ppos) {u64 *counters;size_t avail;
@@ -413,7 +413,7 @@ static ssize_t portcntrs_debugfs_read(struct file *file, char __user *buf,* read the per-port QSFP data for ppd */ static ssize_t qsfp_debugfs_dump (struct file *file,char __user *buf, -size_t count,loff_t *ppos) +size_t count,loff_t *ppos) {struct hfi1_pportdata *ppd;char *tmp;
@@ -437,7 +437,7 @@ static ssize_t qsfp_debugfs_dump(struct file *file, char __user *buf,/* Do an i2c write operation on the chain for the given HFI. */ static ssize_t __i2c_debugfs_write (struct file *file,const char __user *buf, -size_t count,loff_t *ppos,u32 target) +size_t count,loff_t *ppos,u32 target) {struct hfi1_pportdata *ppd;char *buff;
@@ -484,21 +484,21 @@ static ssize_t __i2c_debugfs_write(struct file *file, const char __user *buf,/* Do an i2c write operation on chain for HFI 0. */ static ssize_t i2c1_debugfs_write (struct file *file,const char __user *buf, -size_t count,loff_t *ppos) +size_t count,loff_t *ppos) {return __i2c_debugfs_write (file, buf, count, ppos,0 ); }/* Do an i2c write operation on chain for HFI 1. */ static ssize_t i2c2_debugfs_write (struct file *file,const char __user *buf, -size_t count,loff_t *ppos) +size_t count,loff_t *ppos) {return __i2c_debugfs_write (file, buf, count, ppos,1 ); }/* Do an i2c read operation on the chain for the given HFI. */ static ssize_t __i2c_debugfs_read (struct file *file,char __user *buf, -size_t count,loff_t *ppos,u32 target) +size_t count,loff_t *ppos,u32 target) {struct hfi1_pportdata *ppd;char *buff;
@@ -545,21 +545,21 @@ static ssize_t __i2c_debugfs_read(struct file *file, char __user *buf,/* Do an i2c read operation on chain for HFI 0. */ static ssize_t i2c1_debugfs_read (struct file *file,char __user *buf, -size_t count,loff_t *ppos) +size_t count,loff_t *ppos) {return __i2c_debugfs_read (file, buf, count, ppos,0 ); }/* Do an i2c read operation on chain for HFI 1. */ static ssize_t i2c2_debugfs_read (struct file *file,char __user *buf, -size_t count,loff_t *ppos) +size_t count,loff_t *ppos) {return __i2c_debugfs_read (file, buf, count, ppos,1 ); }/* Do a QSFP write operation on the i2c chain for the given HFI. */ static ssize_t __qsfp_debugfs_write (struct file *file,const char __user *buf, -size_t count,loff_t *ppos,u32 target) +size_t count,loff_t *ppos,u32 target) {struct hfi1_pportdata *ppd;char *buff;
@@ -605,21 +605,21 @@ static ssize_t __qsfp_debugfs_write(struct file *file, const char __user *buf,/* Do a QSFP write operation on i2c chain for HFI 0. */ static ssize_t qsfp1_debugfs_write (struct file *file,const char __user *buf, -size_t count,loff_t *ppos) +size_t count,loff_t *ppos) {return __qsfp_debugfs_write (file, buf, count, ppos,0 ); }/* Do a QSFP write operation on i2c chain for HFI 1. */ static ssize_t qsfp2_debugfs_write (struct file *file,const char __user *buf, -size_t count,loff_t *ppos) +size_t count,loff_t *ppos) {return __qsfp_debugfs_write (file, buf, count, ppos,1 ); }/* Do a QSFP read operation on the i2c chain for the given HFI. */ static ssize_t __qsfp_debugfs_read (struct file *file,char __user *buf, -size_t count,loff_t *ppos,u32 target) +size_t count,loff_t *ppos,u32 target) {struct hfi1_pportdata *ppd;char *buff;
@@ -665,14 +665,14 @@ static ssize_t __qsfp_debugfs_read(struct file *file, char __user *buf,/* Do a QSFP read operation on i2c chain for HFI 0. */ static ssize_t qsfp1_debugfs_read (struct file *file,char __user *buf, -size_t count,loff_t *ppos) +size_t count,loff_t *ppos) {return __qsfp_debugfs_read (file, buf, count, ppos,0 ); }/* Do a QSFP read operation on i2c chain for HFI 1. */ static ssize_t qsfp2_debugfs_read (struct file *file,char __user *buf, -size_t count,loff_t *ppos) +size_t count,loff_t *ppos) {return __qsfp_debugfs_read (file, buf, count, ppos,1 ); }
drivers/staging/rdma/hfi1/driver.c +16 -16
@@ -438,7 +438,7 @@ drop: }static inline void init_packet (struct hfi1_ctxtdata *rcd, -struct hfi1_packet *packet) +struct hfi1_packet *packet) { packet->rsize = rcd->rcvhdrqentsize;/* words */ packet->maxcnt = rcd->rcvhdrq_cnt * packet->rsize;/* words */
@@ -700,8 +700,9 @@ static inline int process_rcv_packet(struct hfi1_packet *packet, int thread)* The +2 is the size of the RHF. */ prefetch_range (packet->ebuf, - packet->tlen - ((packet->rcd->rcvhdrqentsize - - (rhf_hdrq_offset (packet->rhf) +2 )) *4 )); + packet->tlen - ((packet->rcd->rcvhdrqentsize - + (rhf_hdrq_offset (packet->rhf) + +2 )) *4 )); }/*
@@ -958,9 +959,9 @@ int handle_receive_interrupt(struct hfi1_ctxtdata *rcd, int thread)prescan_rxq (rcd, &packet);while (last ==RCV_PKT_OK ) { - -if (unlikely (dd->do_drop &&atomic_xchg (&dd->drop_packet, -DROP_PACKET_OFF ) ==DROP_PACKET_ON )) { +if (unlikely (dd->do_drop && +atomic_xchg (&dd->drop_packet,DROP_PACKET_OFF ) == +DROP_PACKET_ON )) { dd->do_drop =0 ;/* On to the next packet */
@@ -990,8 +991,7 @@ int handle_receive_interrupt(struct hfi1_ctxtdata *rcd, int thread)if (seq != rcd->seq_cnt) last =RCV_PKT_DONE ;if (needset) { -dd_dev_info (dd, -"Switching to NO_DMA_RTAIL\n" ); +dd_dev_info (dd,"Switching to NO_DMA_RTAIL\n" );set_all_nodma_rtail (dd); needset =0 ; }
@@ -1234,7 +1234,7 @@ void hfi1_set_led_override(struct hfi1_pportdata *ppd, unsigned int timeon,if (atomic_inc_return (&ppd->led_override_timer_active) ==1 ) {/* Need to start timer */ setup_timer (&ppd->led_override_timer, run_led_override, - (unsigned long )ppd); + (unsigned long )ppd); ppd->led_override_timer.expires = jiffies +1 ;add_timer (&ppd->led_override_timer);
@@ -1271,8 +1271,8 @@ int hfi1_reset_device(int unit)if (!dd->kregbase || !(dd->flags &HFI1_PRESENT )) {dd_dev_info (dd, -"Invalid unit number %u or not initialized or not present\n" , - unit); +"Invalid unit number %u or not initialized or not present\n" , + unit); ret = -ENXIO ; goto bail; }
@@ -1302,11 +1302,11 @@ int hfi1_reset_device(int unit)if (ret)dd_dev_err (dd, -"Reinitialize unit %u after reset failed with %d\n" , - unit, ret); +"Reinitialize unit %u after reset failed with %d\n" , + unit, ret);else dd_dev_info (dd,"Reinitialized unit %u after resetting\n" , - unit); + unit); bail:return ret;
@@ -1363,7 +1363,7 @@ int process_receive_bypass(struct hfi1_packet *packet)handle_eflags (packet);dd_dev_err (packet->rcd->dd, -"Bypass packets are not supported in normal operation. Dropping\n" ); +"Bypass packets are not supported in normal operation. Dropping\n" );return RHF_RCV_CONTINUE ; }
@@ -1401,6 +1401,6 @@ int kdeth_process_eager(struct hfi1_packet *packet)int process_receive_invalid (struct hfi1_packet *packet) {dd_dev_err (packet->rcd->dd,"Invalid packet type %d. Dropping\n" , -rhf_rcv_type (packet->rhf)); +rhf_rcv_type (packet->rhf));return RHF_RCV_CONTINUE ; }
drivers/staging/rdma/hfi1/eprom.c +17 -22
@@ -115,11 +115,9 @@ static DEFINE_MUTEX(eprom_mutex);static void write_enable (struct hfi1_devdata *dd) {/* raise signal */ -write_csr (dd,ASIC_GPIO_OUT , -read_csr (dd,ASIC_GPIO_OUT ) |EPROM_WP_N ); +write_csr (dd,ASIC_GPIO_OUT ,read_csr (dd,ASIC_GPIO_OUT ) |EPROM_WP_N );/* raise enable */ -write_csr (dd,ASIC_GPIO_OE , -read_csr (dd,ASIC_GPIO_OE ) |EPROM_WP_N ); +write_csr (dd,ASIC_GPIO_OE ,read_csr (dd,ASIC_GPIO_OE ) |EPROM_WP_N ); }/*
@@ -128,11 +126,9 @@ static void write_enable(struct hfi1_devdata *dd)static void write_disable (struct hfi1_devdata *dd) {/* lower signal */ -write_csr (dd,ASIC_GPIO_OUT , -read_csr (dd,ASIC_GPIO_OUT ) & ~EPROM_WP_N ); +write_csr (dd,ASIC_GPIO_OUT ,read_csr (dd,ASIC_GPIO_OUT ) & ~EPROM_WP_N );/* lower enable */ -write_csr (dd,ASIC_GPIO_OE , -read_csr (dd,ASIC_GPIO_OE ) & ~EPROM_WP_N ); +write_csr (dd,ASIC_GPIO_OE ,read_csr (dd,ASIC_GPIO_OE ) & ~EPROM_WP_N ); }/*
@@ -210,8 +206,8 @@ static int erase_range(struct hfi1_devdata *dd, u32 start, u32 len)/* check the end points for the minimum erase */ if ((start &MASK_4KB ) || (end &MASK_4KB )) {dd_dev_err (dd, -"%s: non-aligned range (0x%x,0x%x) for a 4KB erase\n" , - __func__, start, end); +"%s: non-aligned range (0x%x,0x%x) for a 4KB erase\n" , + __func__, start, end);return -EINVAL ; }
@@ -275,7 +271,7 @@ static int read_length(struct hfi1_devdata *dd, u32 start, u32 len, u64 addr)for (offset =0 ; offset < len; offset +=EP_PAGE_SIZE ) {read_page (dd, start + offset, buffer);if (copy_to_user ((void __user *)(addr + offset), - buffer,EP_PAGE_SIZE )) { + buffer,EP_PAGE_SIZE )) { ret = -EFAULT ; goto done; }
@@ -319,7 +315,7 @@ static int write_length(struct hfi1_devdata *dd, u32 start, u32 len, u64 addr)for (offset =0 ; offset < len; offset +=EP_PAGE_SIZE ) {if (copy_from_user (buffer, (void __user *)(addr + offset), -EP_PAGE_SIZE )) { +EP_PAGE_SIZE )) { ret = -EFAULT ; goto done; }
@@ -385,13 +381,13 @@ int handle_eprom_command(struct file *fp, const struct hfi1_cmd *cmd) ret =acquire_hw_mutex (dd);if (ret) {dd_dev_err (dd, -"%s: unable to acquire hw mutex, no EPROM support\n" , - __func__); +"%s: unable to acquire hw mutex, no EPROM support\n" , + __func__); goto done_asic; }dd_dev_info (dd,"%s: cmd: type %d, len 0x%x, addr 0x%016llx\n" , - __func__, cmd->type, cmd->len, cmd->addr); + __func__, cmd->type, cmd->len, cmd->addr);switch (cmd->type) {case HFI1_CMD_EP_INFO :
@@ -402,7 +398,7 @@ int handle_eprom_command(struct file *fp, const struct hfi1_cmd *cmd) dev_id =read_device_id (dd);/* addr points to a u32 user buffer */ if (copy_to_user ((void __user *)cmd->addr, &dev_id, -sizeof (u32))) +sizeof (u32))) ret = -EFAULT ;break ;
@@ -430,7 +426,7 @@ int handle_eprom_command(struct file *fp, const struct hfi1_cmd *cmd)default :dd_dev_err (dd,"%s: unexpected command %d\n" , - __func__, cmd->type); + __func__, cmd->type); ret = -EINVAL ;break ; }
@@ -464,19 +460,18 @@ int eprom_init(struct hfi1_devdata *dd) ret =acquire_hw_mutex (dd);if (ret) {dd_dev_err (dd, -"%s: unable to acquire hw mutex, no EPROM support\n" , - __func__); +"%s: unable to acquire hw mutex, no EPROM support\n" , + __func__); goto done_asic; }/* reset EPROM to be sure it is in a good state */ /* set reset */ -write_csr (dd,ASIC_EEP_CTL_STAT , -ASIC_EEP_CTL_STAT_EP_RESET_SMASK ); +write_csr (dd,ASIC_EEP_CTL_STAT ,ASIC_EEP_CTL_STAT_EP_RESET_SMASK );/* clear reset, set speed */ write_csr (dd,ASIC_EEP_CTL_STAT , -EP_SPEED_FULL <<ASIC_EEP_CTL_STAT_RATE_SPI_SHIFT ); +EP_SPEED_FULL <<ASIC_EEP_CTL_STAT_RATE_SPI_SHIFT );/* wake the device with command "release powerdown NoID" */ write_csr (dd,ASIC_EEP_ADDR_CMD ,CMD_RELEASE_POWERDOWN_NOID );
drivers/staging/rdma/hfi1/file_ops.c +4 -4
@@ -1145,9 +1145,9 @@ static int user_init(struct file *fp)* has done it. */ if (fd->subctxt) { - ret =wait_event_interruptible (uctxt->wait, - !test_bit (HFI1_CTXT_MASTER_UNINIT , - &uctxt->event_flags)); + ret =wait_event_interruptible (uctxt->wait, !test_bit ( +HFI1_CTXT_MASTER_UNINIT , + &uctxt->event_flags)); goto expected; }
@@ -1592,7 +1592,7 @@ static loff_t ui_lseek(struct file *filp, loff_t offset, int whence)/* NOTE: assumes unsigned long is 8 bytes */ static ssize_t ui_read (struct file *filp,char __user *buf,size_t count, -loff_t *f_pos) +loff_t *f_pos) {struct hfi1_devdata *dd = filp->private_data;void __iomem *base = dd->kregbase;
drivers/staging/rdma/hfi1/firmware.c +68 -56
313 lines not on this page · raw message
drivers/staging/rdma/hfi1/hfi.h +3 -2
@@ -1715,8 +1715,9 @@ void restore_pci_variables(struct hfi1_devdata *dd);int do_pcie_gen3_transition (struct hfi1_devdata *dd);int parse_platform_config (struct hfi1_devdata *dd);int get_platform_config_field (struct hfi1_devdata *dd, -enum platform_config_table_type_encoding table_type, -int table_index,int field_index,u32 *data,u32 len); +enum platform_config_table_type_encoding + table_type,int table_index,int field_index, +u32 *data,u32 len);const char *get_unit_name (int unit);const char *get_card_name (struct rvt_dev_info *rdi);
drivers/staging/rdma/hfi1/init.c +12 -12
@@ -149,7 +149,7 @@ int hfi1_create_ctxts(struct hfi1_devdata *dd) rcd =hfi1_create_ctxtdata (ppd, i, dd->node);if (!rcd) {dd_dev_err (dd, -"Unable to allocate kernel receive context, failing\n" ); +"Unable to allocate kernel receive context, failing\n" ); goto nomem; }/*
@@ -170,7 +170,7 @@ int hfi1_create_ctxts(struct hfi1_devdata *dd) rcd->sc =sc_alloc (dd,SC_ACK , rcd->rcvhdrqentsize, dd->node);if (!rcd->sc) {dd_dev_err (dd, -"Unable to allocate kernel send context, failing\n" ); +"Unable to allocate kernel send context, failing\n" ); dd->rcd[rcd->ctxt] =NULL ;hfi1_free_ctxtdata (dd, rcd); goto nomem;
@@ -741,7 +741,7 @@ int hfi1_init(struct hfi1_devdata *dd, int reinit) lastfail =hfi1_setup_eagerbufs (rcd);if (lastfail)dd_dev_err (dd, -"failed to allocate kernel ctxt's rcvhdrq and/or egr bufs\n" ); +"failed to allocate kernel ctxt's rcvhdrq and/or egr bufs\n" ); }if (lastfail) ret = lastfail;
@@ -797,8 +797,8 @@ done: lastfail =bringup_serdes (ppd);if (lastfail)dd_dev_info (dd, -"Failed to bring up port %u\n" , - ppd->port); +"Failed to bring up port %u\n" , + ppd->port);/* * Set status even if port serdes is not initialized
@@ -1542,8 +1542,8 @@ int hfi1_create_rcvhdrq(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd)if (!rcd->rcvhdrq) {dd_dev_err (dd, -"attempt to allocate %d bytes for ctxt %u rcvhdrq failed\n" , - amt, rcd->ctxt); +"attempt to allocate %d bytes for ctxt %u rcvhdrq failed\n" , + amt, rcd->ctxt); goto bail; }
@@ -1587,8 +1587,8 @@ int hfi1_create_rcvhdrq(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd) bail_free:dd_dev_err (dd, -"attempt to allocate 1 page for ctxt %u rcvhdrqtailaddr failed\n" , - rcd->ctxt); +"attempt to allocate 1 page for ctxt %u rcvhdrqtailaddr failed\n" , + rcd->ctxt);vfree (rcd->user_event_mask); rcd->user_event_mask =NULL ; dma_free_coherent(&dd->pcidev->dev, amt, rcd->rcvhdrq,
@@ -1678,7 +1678,7 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd)if (rcd->egrbufs.rcvtid_size == round_mtu || !HFI1_CAP_KGET_MASK (rcd->flags,MULTI_PKT_EGR )) {dd_dev_err (dd,"ctxt%u: Failed to allocate eager buffers\n" , - rcd->ctxt); + rcd->ctxt); goto bail_rcvegrbuf_phys; }
@@ -1760,14 +1760,14 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd)for (idx =0 ; idx < rcd->egrbufs.alloced; idx++) {hfi1_put_tid (dd, rcd->eager_base + idx,PT_EAGER , - rcd->egrbufs.rcvtids[idx].phys, order); + rcd->egrbufs.rcvtids[idx].phys, order);cond_resched (); } goto bail; bail_rcvegrbuf_phys:for (idx =0 ; idx < rcd->egrbufs.alloced && - rcd->egrbufs.buffers[idx].addr; + rcd->egrbufs.buffers[idx].addr; idx++) { dma_free_coherent(&dd->pcidev->dev, rcd->egrbufs.buffers[idx].len,
drivers/staging/rdma/hfi1/intr.c +5 -7
@@ -135,18 +135,16 @@ void handle_linkup_change(struct hfi1_devdata *dd, u32 linkup)set_up_vl15 (dd, dd->vau, dd->vl15_init);assign_remote_cm_au_table (dd, dd->vcu); ppd->neighbor_guid = -read_csr (dd, -DC_DC8051_STS_REMOTE_GUID ); +read_csr (dd,DC_DC8051_STS_REMOTE_GUID ); ppd->neighbor_type =read_csr (dd,DC_DC8051_STS_REMOTE_NODE_TYPE ) &DC_DC8051_STS_REMOTE_NODE_TYPE_VAL_MASK ; ppd->neighbor_port_number =read_csr (dd,DC_DC8051_STS_REMOTE_PORT_NO ) & -DC_DC8051_STS_REMOTE_PORT_NO_VAL_SMASK ; -dd_dev_info (dd, -"Neighbor GUID: %llx Neighbor type %d\n" , - ppd->neighbor_guid, - ppd->neighbor_type); +DC_DC8051_STS_REMOTE_PORT_NO_VAL_SMASK ; +dd_dev_info (dd,"Neighbor GUID: %llx Neighbor type %d\n" , + ppd->neighbor_guid, + ppd->neighbor_type); }/* physical link went up */
drivers/staging/rdma/hfi1/mad.c +74 -67
115 lines not on this page · raw message
drivers/staging/rdma/hfi1/pcie.c +48 -51
99 lines not on this page · raw message
drivers/staging/rdma/hfi1/pio.c +35 -36
71 lines not on this page · raw message
drivers/staging/rdma/hfi1/sdma.c +87 -91
178 lines not on this page · raw message
drivers/staging/rdma/hfi1/trace.c +24 -23
47 lines not on this page · raw message
drivers/staging/rdma/hfi1/trace.h +603 -677
1,280 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
--
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
Part of the diff is not shown here. View the raw message.
PATCH 19/21 staging/rdma/hfi1: Add braces on all arms of statement
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Add braces on all arms of statements to fix checkpatch check:
CHECK: braces {} should be used on all arms of this statement
--- drivers/staging/rdma/hfi1/chip.c | 8 ++++---- drivers/staging/rdma/hfi1/driver.c | 16 ++++++++-------- drivers/staging/rdma/hfi1/file_ops.c | 9 ++++++--- drivers/staging/rdma/hfi1/init.c | 3 ++- drivers/staging/rdma/hfi1/mad.c | 23 ++++++++++++----------- drivers/staging/rdma/hfi1/pcie.c | 3 ++- drivers/staging/rdma/hfi1/qp.c | 13 ++++++++----- drivers/staging/rdma/hfi1/rc.c | 25 ++++++++++++++----------- drivers/staging/rdma/hfi1/sdma.c | 3 ++- drivers/staging/rdma/hfi1/twsi.c | 4 ++-- drivers/staging/rdma/hfi1/uc.c | 31 ++++++++++++++++--------------- drivers/staging/rdma/hfi1/ud.c | 23 ++++++++++++++--------- drivers/staging/rdma/hfi1/user_sdma.c | 6 ++++-- drivers/staging/rdma/hfi1/verbs.c | 11 ++++++----- 14 files changed, 100 insertions(+), 78 deletions(-)
drivers/staging/rdma/hfi1/chip.c +4 -4
@@ -13829,9 +13829,9 @@ int hfi1_set_ctxt_pkey(struct hfi1_devdata *dd, unsigned ctxt, u16 pkey)int ret =0 ;u64 reg; -if (ctxt < dd->num_rcv_contexts) +if (ctxt < dd->num_rcv_contexts) { rcd = dd->rcd[ctxt]; -else { + }else { ret = -EINVAL ; goto done; }
@@ -13857,9 +13857,9 @@ int hfi1_clear_ctxt_pkey(struct hfi1_devdata *dd, unsigned ctxt)int ret =0 ;u64 reg; -if (ctxt < dd->num_rcv_contexts) +if (ctxt < dd->num_rcv_contexts) { rcd = dd->rcd[ctxt]; -else { + }else { ret = -EINVAL ; goto done; }
drivers/staging/rdma/hfi1/driver.c +8 -8
@@ -302,9 +302,9 @@ static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd, goto drop;/* Check for GRH */ -if (lnh ==HFI1_LRH_BTH ) +if (lnh ==HFI1_LRH_BTH ) { ohdr = &hdr->u.oth; -else if (lnh ==HFI1_LRH_GRH ) { + }else if (lnh ==HFI1_LRH_GRH ) {u32 vtf; ohdr = &hdr->u.l.oth;
@@ -314,9 +314,9 @@ static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd,if ((vtf >>IB_GRH_VERSION_SHIFT ) !=IB_GRH_VERSION ) goto drop; rcv_flags |=HFI1_HAS_GRH ; - }else + }else { goto drop; - + }/* Get the destination QP number. */ qp_num =be32_to_cpu (ohdr->bth[1 ]) &RVT_QPN_MASK ;if (lid <be16_to_cpu (IB_MULTICAST_LID_BASE )) {
@@ -618,14 +618,14 @@ static void __prescan_rxq(struct hfi1_packet *packet)hfi1_get_msgheader (dd, rhf_addr); lnh =be16_to_cpu (hdr->lrh[0 ]) &3 ; -if (lnh ==HFI1_LRH_BTH ) +if (lnh ==HFI1_LRH_BTH ) { ohdr = &hdr->u.oth; -else if (lnh ==HFI1_LRH_GRH ) { + }else if (lnh ==HFI1_LRH_GRH ) { ohdr = &hdr->u.l.oth; grh = &hdr->u.l.grh; - }else + }else { goto next;/* just in case */ - + } bth1 =be32_to_cpu (ohdr->bth[1 ]); is_ecn = !!(bth1 & (HFI1_FECN_SMASK |HFI1_BECN_SMASK ));
drivers/staging/rdma/hfi1/file_ops.c +6 -3
@@ -399,8 +399,9 @@ static ssize_t hfi1_file_write(struct file *fp, const char __user *data, ret =sc_enable (sc);hfi1_rcvctrl (dd,HFI1_RCVCTRL_CTXT_ENB , uctxt->ctxt); - }else + }else { ret =sc_restart (sc); + }if (!ret)sc_return_credits (sc);break ;
@@ -1409,8 +1410,9 @@ static unsigned int poll_next(struct file *fp,set_bit (HFI1_CTXT_WAITING_RCV , &uctxt->event_flags);hfi1_rcvctrl (dd,HFI1_RCVCTRL_INTRAVAIL_ENB , uctxt->ctxt); pollflag =0 ; - }else + }else { pollflag =POLLIN |POLLRDNORM ; + }spin_unlock_irq (&dd->uctxt_lock);return pollflag;
@@ -1488,8 +1490,9 @@ static int manage_rcvq(struct hfi1_ctxtdata *uctxt, unsigned subctxt,if (uctxt->rcvhdrtail_kvaddr)clear_rcvhdrtail (uctxt); rcvctrl_op =HFI1_RCVCTRL_CTXT_ENB ; - }else + }else { rcvctrl_op =HFI1_RCVCTRL_CTXT_DIS ; + }hfi1_rcvctrl (dd, rcvctrl_op, uctxt->ctxt);/* always; new head should be equal to new tail; see above */ bail:
drivers/staging/rdma/hfi1/init.c +2 -1
@@ -1713,8 +1713,9 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd) rcd->egrbufs.buffers[j].len)) { j++; offset = 0; - } else + } else { offset += new_size; + } } rcd->egrbufs.rcvtid_size = new_size; }
drivers/staging/rdma/hfi1/mad.c +12 -11
@@ -135,15 +135,16 @@ static void send_trap(struct hfi1_ibport *ibp, void *data, unsigned len)struct ib_ah *ah; ah =hfi1_create_qp0_ah (ibp, ibp->rvp.sm_lid); -if (IS_ERR (ah)) +if (IS_ERR (ah)) { ret =PTR_ERR (ah); -else { + }else { send_buf->ah = ah; ibp->rvp.sm_ah =ibah_to_rvtah (ah); ret =0 ; } - }else + }else { ret = -EINVAL ; + } }else { send_buf->ah = &ibp->rvp.sm_ah->ibah; ret =0 ;
@@ -769,9 +770,9 @@ static int __subn_get_opa_pkeytable(struct opa_smp *smp, u32 am, u8 *data, p[i] =cpu_to_be16 (q[i]);if (resp_len) *resp_len += size; - }else + }else { smp->status |=IB_SMP_INVALID_FIELD ; - + }return reply ((struct ib_mad_hdr *)smp); }
@@ -977,15 +978,15 @@ static int set_port_states(struct hfi1_pportdata *ppd, struct opa_smp *smp,break ;/* FALLTHROUGH */ case IB_PORT_DOWN : -if (phys_state ==IB_PORTPHYSSTATE_NOP ) +if (phys_state ==IB_PORTPHYSSTATE_NOP ) { link_state =HLS_DN_DOWNDEF ; -else if (phys_state ==IB_PORTPHYSSTATE_POLLING ) { + }else if (phys_state ==IB_PORTPHYSSTATE_POLLING ) { link_state =HLS_DN_POLL ;set_link_down_reason (ppd,OPA_LINKDOWN_REASON_FM_BOUNCE ,0 ,OPA_LINKDOWN_REASON_FM_BOUNCE ); - }else if (phys_state ==IB_PORTPHYSSTATE_DISABLED ) + }else if (phys_state ==IB_PORTPHYSSTATE_DISABLED ) { link_state =HLS_DN_DISABLE ; -else { + }else {pr_warn ("SubnSet(OPA_PortInfo) invalid physical state 0x%x\n" , phys_state); smp->status |=IB_SMP_INVALID_FIELD ;
@@ -1193,9 +1194,9 @@ static int __subn_set_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data,set_link_width_downgrade_enabled (ppd, lwe); call_link_downgrade_policy =1 ; } - }else + }else { smp->status |=IB_SMP_INVALID_FIELD ; - + } lse =be16_to_cpu (pi->link_speed.enabled);if (lse) {if (lse &be16_to_cpu (pi->link_speed.supported))
drivers/staging/rdma/hfi1/pcie.c +2 -1
@@ -123,8 +123,9 @@ int hfi1_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent) goto bail; } ret =pci_set_consistent_dma_mask (pdev,DMA_BIT_MASK (32 )); - }else + }else { ret =pci_set_consistent_dma_mask (pdev,DMA_BIT_MASK (64 )); + }if (ret) {hfi1_early_err (&pdev->dev,"Unable to set DMA consistent mask: %d\n" , ret);
drivers/staging/rdma/hfi1/qp.c +8 -5
@@ -326,12 +326,15 @@ __be32 hfi1_compute_aeth(struct rvt_qp *qp) x = (min + max) /2 ;if (credit_table[x] == credits)break ; -if (credit_table[x] > credits) +if (credit_table[x] > credits) { max = x; -else if (min == x) -break ; -else - min = x; + }else { +if (min == x) { +break ; + }else { + min = x; + } + } } aeth |= x <<HFI1_AETH_CREDIT_SHIFT ; }
drivers/staging/rdma/hfi1/rc.c +14 -11
@@ -505,9 +505,9 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) len = pmtu;break ; } -if (wqe->wr.opcode ==IB_WR_SEND ) +if (wqe->wr.opcode ==IB_WR_SEND ) { qp->s_state =OP (SEND_ONLY ); -else { + }else { qp->s_state =OP (SEND_ONLY_WITH_IMMEDIATE );/* Immediate data comes after the BTH */ ohdr->u.imm_data = wqe->wr.ex.imm_data;
@@ -542,9 +542,9 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) len = pmtu;break ; } -if (wqe->wr.opcode ==IB_WR_RDMA_WRITE ) +if (wqe->wr.opcode ==IB_WR_RDMA_WRITE ) { qp->s_state =OP (RDMA_WRITE_ONLY ); -else { + }else { qp->s_state =OP (RDMA_WRITE_ONLY_WITH_IMMEDIATE );/* Immediate data comes after RETH */
@@ -672,9 +672,9 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) middle =HFI1_CAP_IS_KSET (SDMA_AHG );break ; } -if (wqe->wr.opcode ==IB_WR_SEND ) +if (wqe->wr.opcode ==IB_WR_SEND ) { qp->s_state =OP (SEND_LAST ); -else { + }else { qp->s_state =OP (SEND_LAST_WITH_IMMEDIATE );/* Immediate data comes after the BTH */ ohdr->u.imm_data = wqe->wr.ex.imm_data;
@@ -712,9 +712,9 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) middle =HFI1_CAP_IS_KSET (SDMA_AHG );break ; } -if (wqe->wr.opcode ==IB_WR_RDMA_WRITE ) +if (wqe->wr.opcode ==IB_WR_RDMA_WRITE ) { qp->s_state =OP (RDMA_WRITE_LAST ); -else { + }else { qp->s_state =OP (RDMA_WRITE_LAST_WITH_IMMEDIATE );/* Immediate data comes after the BTH */ ohdr->u.imm_data = wqe->wr.ex.imm_data;
@@ -1013,10 +1013,12 @@ static void restart_rc(struct rvt_qp *qp, u32 psn, int wait)hfi1_send_complete (qp, wqe,IB_WC_RETRY_EXC_ERR );rvt_error_qp (qp,IB_WC_WR_FLUSH_ERR );return ; - }else /* need to handle delayed completion */ + }else {/* need to handle delayed completion */ return ; - }else + } + }else { qp->s_retry--; + } ibp =to_iport (qp->ibqp.device, qp->port_num);if (wqe->wr.opcode ==IB_WR_RDMA_READ )
@@ -1612,8 +1614,9 @@ static void rc_rcv_resp(struct hfi1_ibport *ibp, val = ((u64 )be32_to_cpu (p[0 ]) <<32 ) |be32_to_cpu (p[1 ]); - }else + }else { val =0 ; + }if (!do_rc_ack (qp, aeth, psn, opcode, val, rcd) || opcode !=OP (RDMA_READ_RESPONSE_FIRST )) goto ack_done;
drivers/staging/rdma/hfi1/sdma.c +2 -1
@@ -2010,8 +2010,9 @@ static int sdma_check_progress( ret = wait->sleep (sde, wait, tx, seq);if (ret == -EAGAIN ) sde->desc_avail =sdma_descq_freecnt (sde); - }else + }else { ret = -EBUSY ; + }return ret; }
drivers/staging/rdma/hfi1/twsi.c +2 -2
@@ -119,9 +119,9 @@ static void scl_out(struct hfi1_devdata *dd, u32 target, u8 bit)* Allow for slow slaves by simple * delay for falling edge, sampling on rise. */ -if (!bit) +if (!bit) {udelay (2 ); -else { + }else {int rise_usec;for (rise_usec =SCL_WAIT_USEC ; rise_usec >0 ; rise_usec -=2 ) {
drivers/staging/rdma/hfi1/uc.c +16 -15
@@ -139,9 +139,9 @@ int hfi1_make_uc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) len = pmtu;break ; } -if (wqe->wr.opcode ==IB_WR_SEND ) +if (wqe->wr.opcode ==IB_WR_SEND ) { qp->s_state =OP (SEND_ONLY ); -else { + }else { qp->s_state =OP (SEND_ONLY_WITH_IMMEDIATE );/* Immediate data comes after the BTH */
@@ -168,9 +168,9 @@ int hfi1_make_uc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) len = pmtu;break ; } -if (wqe->wr.opcode ==IB_WR_RDMA_WRITE ) +if (wqe->wr.opcode ==IB_WR_RDMA_WRITE ) { qp->s_state =OP (RDMA_WRITE_ONLY ); -else { + }else { qp->s_state =OP (RDMA_WRITE_ONLY_WITH_IMMEDIATE );/* Immediate data comes after the RETH */
@@ -199,9 +199,9 @@ int hfi1_make_uc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) middle =HFI1_CAP_IS_KSET (SDMA_AHG );break ; } -if (wqe->wr.opcode ==IB_WR_SEND ) +if (wqe->wr.opcode ==IB_WR_SEND ) { qp->s_state =OP (SEND_LAST ); -else { + }else { qp->s_state =OP (SEND_LAST_WITH_IMMEDIATE );/* Immediate data comes after the BTH */ ohdr->u.imm_data = wqe->wr.ex.imm_data;
@@ -224,9 +224,9 @@ int hfi1_make_uc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) middle =HFI1_CAP_IS_KSET (SDMA_AHG );break ; } -if (wqe->wr.opcode ==IB_WR_RDMA_WRITE ) +if (wqe->wr.opcode ==IB_WR_RDMA_WRITE ) { qp->s_state =OP (RDMA_WRITE_LAST ); -else { + }else { qp->s_state =OP (RDMA_WRITE_LAST_WITH_IMMEDIATE );/* Immediate data comes after the BTH */
@@ -353,8 +353,9 @@ inv: qp->r_state == OP(SEND_MIDDLE)) { set_bit(RVT_R_REWIND_SGE, &qp->r_aflags); qp->r_sge.num_sge = 0; - } else + } else {rvt_put_ss (&qp->r_sge); + } qp->r_state =OP (SEND_LAST );switch (opcode) {case OP (SEND_FIRST ):
@@ -410,9 +411,9 @@ inv:case OP (SEND_ONLY ):case OP (SEND_ONLY_WITH_IMMEDIATE ): send_first: -if (test_and_clear_bit (RVT_R_REWIND_SGE , &qp->r_aflags)) +if (test_and_clear_bit (RVT_R_REWIND_SGE , &qp->r_aflags)) { qp->r_sge = qp->s_rdma_read_sge; -else { + }else { ret =hfi1_rvt_get_rwqe (qp,0 );if (ret <0 ) goto op_err;
@@ -523,9 +524,9 @@ rdma_first: qp->r_sge.sge.length =0 ; qp->r_sge.sge.sge_length =0 ; } -if (opcode ==OP (RDMA_WRITE_ONLY )) +if (opcode ==OP (RDMA_WRITE_ONLY )) { goto rdma_last; -else if (opcode ==OP (RDMA_WRITE_ONLY_WITH_IMMEDIATE )) { + }else if (opcode ==OP (RDMA_WRITE_ONLY_WITH_IMMEDIATE )) { wc.ex.imm_data = ohdr->u.rc.imm_data; goto rdma_last_imm; }
@@ -555,9 +556,9 @@ rdma_last_imm: tlen -= (hdrsize + pad +4 );if (unlikely (tlen + qp->r_rcv_len != qp->r_len)) goto drop; -if (test_and_clear_bit (RVT_R_REWIND_SGE , &qp->r_aflags)) +if (test_and_clear_bit (RVT_R_REWIND_SGE , &qp->r_aflags)) {rvt_put_ss (&qp->s_rdma_read_sge); -else { + }else { ret =hfi1_rvt_get_rwqe (qp,1 );if (ret <0 ) goto op_err;
drivers/staging/rdma/hfi1/ud.c +14 -9
@@ -163,9 +163,9 @@ static void ud_loopback(struct rvt_qp *sqp, struct rvt_swqe *swqe)/* * Get the next work request entry to find where to put the data. */ -if (qp->r_flags &RVT_R_REUSE_SGE ) +if (qp->r_flags &RVT_R_REUSE_SGE ) { qp->r_flags &= ~RVT_R_REUSE_SGE ; -else { + }else {int ret; ret =hfi1_rvt_get_rwqe (qp,0 );
@@ -190,8 +190,9 @@ static void ud_loopback(struct rvt_qp *sqp, struct rvt_swqe *swqe)hfi1_copy_sge (&qp->r_sge, &ah_attr->grh,sizeof (struct ib_grh ),1 ,0 ); wc.wc_flags |=IB_WC_GRH ; - }else + }else {hfi1_skip_sge (&qp->r_sge,sizeof (struct ib_grh ),1 ); + } ssge.sg_list = swqe->sg_list +1 ; ssge.sge = *swqe->sg_list; ssge.num_sge = swqe->wr.num_sge;
@@ -383,8 +384,9 @@ int hfi1_make_ud_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) qp->s_hdrwords++; ohdr->u.ud.imm_data = wqe->wr.ex.imm_data; bth0 =IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE <<24 ; - }else + }else { bth0 =IB_OPCODE_UD_SEND_ONLY <<24 ; + } sc5 = ibp->sl_to_sc[ah_attr->sl]; lrh0 |= (ah_attr->sl &0xf ) <<4 ;if (qp->ibqp.qp_type ==IB_QPT_SMI ) {
@@ -820,8 +822,9 @@ void hfi1_ud_rcv(struct hfi1_packet *packet) }else if (opcode ==IB_OPCODE_UD_SEND_ONLY ) { wc.ex.imm_data =0 ; wc.wc_flags =0 ; - }else + }else { goto drop; + }/* * A GRH is expected to precede the data even if not
@@ -832,9 +835,9 @@ void hfi1_ud_rcv(struct hfi1_packet *packet)/* * Get the next work request entry to find where to put the data. */ -if (qp->r_flags &RVT_R_REUSE_SGE ) +if (qp->r_flags &RVT_R_REUSE_SGE ) { qp->r_flags &= ~RVT_R_REUSE_SGE ; -else { + }else {int ret; ret =hfi1_rvt_get_rwqe (qp,0 );
@@ -857,8 +860,9 @@ void hfi1_ud_rcv(struct hfi1_packet *packet)hfi1_copy_sge (&qp->r_sge, &hdr->u.l.grh,sizeof (struct ib_grh ),1 ,0 ); wc.wc_flags |=IB_WC_GRH ; - }else + }else {hfi1_skip_sge (&qp->r_sge,sizeof (struct ib_grh ),1 ); + }hfi1_copy_sge (&qp->r_sge, data, wc.byte_len -sizeof (struct ib_grh ),1 ,0 );rvt_put_ss (&qp->r_sge);
@@ -884,8 +888,9 @@ void hfi1_ud_rcv(struct hfi1_packet *packet) } } wc.pkey_index = (unsigned )mgmt_pkey_idx; - }else + }else { wc.pkey_index =0 ; + } wc.slid =be16_to_cpu (hdr->lrh[3 ]); sc = (be16_to_cpu (hdr->lrh[0 ]) >>12 ) &0xf ;
drivers/staging/rdma/hfi1/user_sdma.c +4 -2
@@ -765,8 +765,9 @@ static inline u32 compute_data_length(struct user_sdma_request *req,* remaining. */ len =min (len, req->data_len - req->sent); - }else + }else { len =min (req->data_len - req->sent, (u32 )req->info.fragsize); + }SDMA_DBG (req,"Data Length = %u" , len);return len; }
@@ -1337,8 +1338,9 @@ static int set_txreq_header_ahg(struct user_sdma_request *req, INTR) >> 16); val &=cpu_to_le16 (~(1U <<13 ));AHG_HEADER_SET (req->ahg, diff,7 ,16 ,14 , val); - }else + }else {AHG_HEADER_SET (req->ahg, diff,7 ,16 ,12 , val); + } } trace_hfi1_sdma_user_header_ahg(pq->dd, pq->ctxt, pq->subctxt,
drivers/staging/rdma/hfi1/verbs.c +6 -5
@@ -400,9 +400,9 @@ void hfi1_ib_rcv(struct hfi1_packet *packet)/* Check for GRH */ lnh =be16_to_cpu (hdr->lrh[0 ]) &3 ; -if (lnh ==HFI1_LRH_BTH ) +if (lnh ==HFI1_LRH_BTH ) { packet->ohdr = &hdr->u.oth; -else if (lnh ==HFI1_LRH_GRH ) { + }else if (lnh ==HFI1_LRH_GRH ) {u32 vtf; packet->ohdr = &hdr->u.l.oth;
@@ -412,8 +412,9 @@ void hfi1_ib_rcv(struct hfi1_packet *packet)if ((vtf >>IB_GRH_VERSION_SHIFT ) !=IB_GRH_VERSION ) goto drop; packet->rcv_flags |=HFI1_HAS_GRH ; - }else + }else { goto drop; + }trace_input_ibhdr (rcd->dd, hdr);
@@ -528,9 +529,9 @@ static void verbs_sdma_complete(struct rvt_qp *qp = tx->qp;spin_lock (&qp->s_lock); -if (tx->wqe) +if (tx->wqe) {hfi1_send_complete (qp, tx->wqe,IB_WC_SUCCESS ); -else if (qp->ibqp.qp_type ==IB_QPT_RC ) { + }else if (qp->ibqp.qp_type ==IB_QPT_RC ) {struct hfi1_ib_header *hdr; hdr = &tx->phdr.hdr;
--
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 20/21 staging/rdma/hfi1: Remove else after break
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Remove else after break to fix checkpatch warning:
WARNING: else is not generally useful after a break or return
--- drivers/staging/rdma/hfi1/qp.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/staging/rdma/hfi1/qp.c +2 -4
@@ -329,11 +329,9 @@ __be32 hfi1_compute_aeth(struct rvt_qp *qp)if (credit_table[x] > credits) { max = x; }else { -if (min == x) { +if (min == x)break ; - }else { - min = x; - } + min = x; } } aeth |= x <<HFI1_AETH_CREDIT_SHIFT ;
--
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 21/21 staging/rdma/hfi1: Fix header
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Fix the header by moving the copyright notice out of the license text and to the top of the header. Also, update the copyright date.
--- drivers/staging/rdma/hfi1/affinity.c | 5 +---- drivers/staging/rdma/hfi1/affinity.h | 5 +---- drivers/staging/rdma/hfi1/aspm.h | 5 +---- drivers/staging/rdma/hfi1/chip.c | 5 +---- drivers/staging/rdma/hfi1/chip.h | 5 +---- drivers/staging/rdma/hfi1/chip_registers.h | 5 +---- drivers/staging/rdma/hfi1/common.h | 5 +---- drivers/staging/rdma/hfi1/debugfs.c | 5 +---- drivers/staging/rdma/hfi1/debugfs.h | 5 +---- drivers/staging/rdma/hfi1/device.c | 5 +---- drivers/staging/rdma/hfi1/device.h | 5 +---- drivers/staging/rdma/hfi1/diag.c | 5 +---- drivers/staging/rdma/hfi1/dma.c | 5 +---- drivers/staging/rdma/hfi1/driver.c | 5 +---- drivers/staging/rdma/hfi1/efivar.c | 5 +---- drivers/staging/rdma/hfi1/efivar.h | 5 +---- drivers/staging/rdma/hfi1/eprom.c | 5 +---- drivers/staging/rdma/hfi1/eprom.h | 5 +---- drivers/staging/rdma/hfi1/file_ops.c | 5 +---- drivers/staging/rdma/hfi1/firmware.c | 5 +---- drivers/staging/rdma/hfi1/hfi.h | 5 +---- drivers/staging/rdma/hfi1/init.c | 5 +---- drivers/staging/rdma/hfi1/intr.c | 5 +---- drivers/staging/rdma/hfi1/iowait.h | 5 +---- drivers/staging/rdma/hfi1/mad.c | 5 +---- drivers/staging/rdma/hfi1/mad.h | 5 +---- drivers/staging/rdma/hfi1/opa_compat.h | 5 +---- drivers/staging/rdma/hfi1/pcie.c | 5 +---- drivers/staging/rdma/hfi1/pio.c | 5 +---- drivers/staging/rdma/hfi1/pio.h | 5 +---- drivers/staging/rdma/hfi1/pio_copy.c | 5 +---- drivers/staging/rdma/hfi1/platform.c | 5 +---- drivers/staging/rdma/hfi1/platform.h | 5 +---- drivers/staging/rdma/hfi1/qp.c | 5 +---- drivers/staging/rdma/hfi1/qp.h | 5 +---- drivers/staging/rdma/hfi1/qsfp.c | 5 +---- drivers/staging/rdma/hfi1/qsfp.h | 5 +---- drivers/staging/rdma/hfi1/rc.c | 5 +---- drivers/staging/rdma/hfi1/ruc.c | 5 +---- drivers/staging/rdma/hfi1/sdma.c | 5 +---- drivers/staging/rdma/hfi1/sdma.h | 5 +---- drivers/staging/rdma/hfi1/sysfs.c | 5 +---- drivers/staging/rdma/hfi1/trace.c | 5 +---- drivers/staging/rdma/hfi1/trace.h | 5 +---- drivers/staging/rdma/hfi1/twsi.c | 5 +---- drivers/staging/rdma/hfi1/twsi.h | 5 +---- drivers/staging/rdma/hfi1/uc.c | 5 +---- drivers/staging/rdma/hfi1/ud.c | 5 +---- drivers/staging/rdma/hfi1/user_exp_rcv.c | 5 +---- drivers/staging/rdma/hfi1/user_exp_rcv.h | 5 +---- drivers/staging/rdma/hfi1/user_pages.c | 5 +---- drivers/staging/rdma/hfi1/user_sdma.c | 5 +---- drivers/staging/rdma/hfi1/user_sdma.h | 5 +---- drivers/staging/rdma/hfi1/verbs.c | 5 +---- drivers/staging/rdma/hfi1/verbs.h | 5 +---- 55 files changed, 55 insertions(+), 220 deletions(-)
drivers/staging/rdma/hfi1/affinity.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/affinity.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/aspm.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/chip.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/chip.h +1 -4
@@ -1,14 +1,13 @@#ifndef _CHIP_H#define _CHIP_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/chip_registers.h +1 -4
@@ -2,14 +2,13 @@#define DEF_CHIP_REG /* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -21,8 +20,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/common.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/debugfs.c +1 -4
@@ -1,13 +1,12 @@#ifdef CONFIG_DEBUG_FS /* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -19,8 +18,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/debugfs.h +1 -4
@@ -1,14 +1,13 @@#ifndef _HFI1_DEBUGFS_H#define _HFI1_DEBUGFS_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/device.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/device.h +1 -4
@@ -1,14 +1,13 @@#ifndef _HFI1_DEVICE_H#define _HFI1_DEVICE_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/diag.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/dma.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/driver.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/efivar.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/efivar.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/eprom.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/eprom.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/file_ops.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/firmware.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/hfi.h +1 -4
@@ -1,14 +1,13 @@#ifndef _HFI1_KERNEL_H#define _HFI1_KERNEL_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/init.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/intr.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/iowait.h +1 -4
@@ -1,14 +1,13 @@#ifndef _HFI1_IOWAIT_H#define _HFI1_IOWAIT_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/mad.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/mad.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/opa_compat.h +1 -4
@@ -1,14 +1,13 @@#ifndef _LINUX_H#define _LINUX_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/pcie.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/pio.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/pio.h +1 -4
@@ -1,14 +1,13 @@#ifndef _PIO_H#define _PIO_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/pio_copy.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/platform.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/platform.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/qp.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/qp.h +1 -4
@@ -1,14 +1,13 @@#ifndef _QP_H#define _QP_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/qsfp.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/qsfp.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/rc.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/ruc.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/sdma.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/sdma.h +1 -4
@@ -1,14 +1,13 @@#ifndef _HFI1_SDMA_H#define _HFI1_SDMA_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/sysfs.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/trace.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/trace.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/twsi.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/twsi.h +1 -4
@@ -1,14 +1,13 @@#ifndef _TWSI_H#define _TWSI_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/uc.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/ud.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/user_exp_rcv.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/user_exp_rcv.h +1 -4
@@ -1,14 +1,13 @@#ifndef _HFI1_USER_EXP_RCV_H#define _HFI1_USER_EXP_RCV_H/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -20,8 +19,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/user_pages.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/user_sdma.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/user_sdma.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015, 2016 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015, 2016 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/verbs.c +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
drivers/staging/rdma/hfi1/verbs.h +1 -4
@@ -1,12 +1,11 @@/* +* Copyright(c) 2015, 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * -* Copyright(c) 2015 Intel Corporation. -* * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation.
@@ -18,8 +17,6 @@* * BSD LICENSE * -* Copyright(c) 2015 Intel Corporation. -* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
--
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