[ofa-general] [PATCH 1/6] nes: cosmetic and whitespace cleanup

Glenn Grundstrom NetEffect glenn at lists.openfabrics.org
Thu Dec 13 16:30:16 PST 2007


Run cleanfile to fix up whitespace

>From Rolands infiniband tree to update OFED.

Signed-off-by: Glenn Grundstrom <ggrundstrom at neteffect.com>

---

diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index d101117..638bc51 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -283,7 +283,7 @@ struct sk_buff *form_cm_frame(struct sk_buff *skb, struct nes_cm_node *cm_node,
 	iph->tos = 0;
 	iph->tot_len = htons(packetsize);
 	iph->id = htons(++cm_node->tcp_cntxt.loc_id);
-	
+
 	iph->frag_off = ntohs(0x4000);
 	iph->ttl = 0x40;
 	iph->protocol= 0x06;	/* IPPROTO_TCP */
@@ -1078,8 +1078,8 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core,
 	atomic_inc(&cm_core->session_id);
 	cm_node->session_id = (u32)(atomic_read(&cm_core->session_id) + current->tgid);
 	cm_node->conn_type = cm_info->conn_type;
- 	cm_node->apbvt_set = 0;
- 	cm_node->accept_pend = 0;
+	cm_node->apbvt_set = 0;
+	cm_node->accept_pend = 0;
 
 	cm_node->nesvnic = nesvnic;
 	/* get some device handles, for arp lookup */
@@ -2019,22 +2019,22 @@ static int nes_cm_init_tsa_conn(struct nes_qp *nesqp, struct nes_cm_node *cm_nod
 			NES_QPCONTEXT_PDWSCALE_RCV_WSCALE_MASK);
 
 	nesqp->nesqp_context->keepalive = cpu_to_le32(0x80);
-	nesqp->nesqp_context->ts_recent = 0;	
-	nesqp->nesqp_context->ts_age = 0;	
-	nesqp->nesqp_context->snd_nxt = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num);	
-	nesqp->nesqp_context->snd_wnd = cpu_to_le32(cm_node->tcp_cntxt.snd_wnd);	
-	nesqp->nesqp_context->rcv_nxt = cpu_to_le32(cm_node->tcp_cntxt.rcv_nxt);	
+	nesqp->nesqp_context->ts_recent = 0;
+	nesqp->nesqp_context->ts_age = 0;
+	nesqp->nesqp_context->snd_nxt = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num);
+	nesqp->nesqp_context->snd_wnd = cpu_to_le32(cm_node->tcp_cntxt.snd_wnd);
+	nesqp->nesqp_context->rcv_nxt = cpu_to_le32(cm_node->tcp_cntxt.rcv_nxt);
 	nesqp->nesqp_context->rcv_wnd = cpu_to_le32(cm_node->tcp_cntxt.rcv_wnd <<
-			cm_node->tcp_cntxt.rcv_wscale);	
-	nesqp->nesqp_context->snd_max = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num);	
-	nesqp->nesqp_context->snd_una = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num);	
-	nesqp->nesqp_context->srtt = 0;		
-	nesqp->nesqp_context->rttvar = cpu_to_le32(0x6);	
-	nesqp->nesqp_context->ssthresh = cpu_to_le32(0x3FFFC000);	
-	nesqp->nesqp_context->cwnd = cpu_to_le32(2*cm_node->tcp_cntxt.mss);	
-	nesqp->nesqp_context->snd_wl1 = cpu_to_le32(cm_node->tcp_cntxt.rcv_nxt);	
-	nesqp->nesqp_context->snd_wl2 = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num);	
-	nesqp->nesqp_context->max_snd_wnd = cpu_to_le32(cm_node->tcp_cntxt.max_snd_wnd);	
+			cm_node->tcp_cntxt.rcv_wscale);
+	nesqp->nesqp_context->snd_max = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num);
+	nesqp->nesqp_context->snd_una = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num);
+	nesqp->nesqp_context->srtt = 0;
+	nesqp->nesqp_context->rttvar = cpu_to_le32(0x6);
+	nesqp->nesqp_context->ssthresh = cpu_to_le32(0x3FFFC000);
+	nesqp->nesqp_context->cwnd = cpu_to_le32(2*cm_node->tcp_cntxt.mss);
+	nesqp->nesqp_context->snd_wl1 = cpu_to_le32(cm_node->tcp_cntxt.rcv_nxt);
+	nesqp->nesqp_context->snd_wl2 = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num);
+	nesqp->nesqp_context->max_snd_wnd = cpu_to_le32(cm_node->tcp_cntxt.max_snd_wnd);
 
 	nes_debug(NES_DBG_CM, "QP%u: rcv_nxt = 0x%08X, snd_nxt = 0x%08X,"
 			" Setting MSS to %u, PDWscale = 0x%08X, rcv_wnd = %u, context misc = 0x%08X.\n",
diff --git a/drivers/infiniband/hw/nes/nes_cm.h b/drivers/infiniband/hw/nes/nes_cm.h
index 00eaeb1..cd8e003 100644
--- a/drivers/infiniband/hw/nes/nes_cm.h
+++ b/drivers/infiniband/hw/nes/nes_cm.h
@@ -122,7 +122,7 @@ struct nes_timer_entry {
 	unsigned long timetosend;	/* jiffies */
 	struct sk_buff *skb;
 	u32 type;
-	u32 retrycount;	 
+	u32 retrycount;
 	u32 retranscount;
 	u32 context;
 	u32 seq_num;
@@ -142,15 +142,15 @@ struct nes_timer_entry {
 #define NES_LONG_TIME       (2000*HZ/1000)
 
 #define NES_CM_HASHTABLE_SIZE         1024
-#define NES_CM_TCP_TIMER_INTERVAL     3000	
+#define NES_CM_TCP_TIMER_INTERVAL     3000
 #define NES_CM_DEFAULT_MTU            1540
 #define NES_CM_DEFAULT_FRAME_CNT      10
-#define NES_CM_THREAD_STACK_SIZE      256	
+#define NES_CM_THREAD_STACK_SIZE      256
 #define NES_CM_DEFAULT_RCV_WND        64240	// before we know that window scaling is allowed
 #define NES_CM_DEFAULT_RCV_WND_SCALED 256960  // after we know that window scaling is allowed
 #define NES_CM_DEFAULT_RCV_WND_SCALE  2
-#define NES_CM_DEFAULT_FREE_PKTS      0x000A	
-#define NES_CM_FREE_PKT_LO_WATERMARK  2	
+#define NES_CM_DEFAULT_FREE_PKTS      0x000A
+#define NES_CM_FREE_PKT_LO_WATERMARK  2
 
 #define NES_CM_DEF_SEQ       0x159bf75f
 #define NES_CM_DEF_LOCAL_ID  0x3b47
@@ -192,12 +192,12 @@ enum nes_cm_conn_type {
 
 /* CM context params */
 struct nes_cm_tcp_context {
-	u8  client;			
+	u8  client;
 
-	u32 loc_seq_num;	
-	u32 loc_ack_num;	
-	u32 rem_ack_num;	
-	u32 rcv_nxt;		
+	u32 loc_seq_num;
+	u32 loc_ack_num;
+	u32 rem_ack_num;
+	u32 rcv_nxt;
 
 	u32 loc_id;
 	u32 rem_id;
@@ -210,8 +210,8 @@ struct nes_cm_tcp_context {
 	u8  snd_wscale;
 	u8  rcv_wscale;
 
-	struct nes_cm_tsa_context tsa_cntxt;	
-	struct timeval            sent_ts;		
+	struct nes_cm_tsa_context tsa_cntxt;
+	struct timeval            sent_ts;
 };
 
 
@@ -223,7 +223,7 @@ enum nes_cm_listener_state {
 
 struct nes_cm_listener {
 	struct list_head           list;
-	u64                        session_id;	
+	u64                        session_id;
 	struct nes_cm_core         *cm_core;
 	u8                         loc_mac[ETH_ALEN];
 	nes_addr_t                 loc_addr;
@@ -240,17 +240,17 @@ struct nes_cm_listener {
 
 /* per connection node and node state information */
 struct nes_cm_node {
-	u64                       session_id;	
-	u32                       hashkey;	
+	u64                       session_id;
+	u32                       hashkey;
 
 	nes_addr_t                loc_addr, rem_addr;
 	u16                       loc_port, rem_port;
 
-	u8                        loc_mac[ETH_ALEN];	
-	u8                        rem_mac[ETH_ALEN];	
+	u8                        loc_mac[ETH_ALEN];
+	u8                        rem_mac[ETH_ALEN];
 
-	enum nes_cm_node_state    state;	
-	struct nes_cm_tcp_context tcp_cntxt;	
+	enum nes_cm_node_state    state;
+	struct nes_cm_tcp_context tcp_cntxt;
 	struct nes_cm_core        *cm_core;
 	struct sk_buff_head       resend_list;
 	atomic_t                  ref_count;
@@ -261,10 +261,10 @@ struct nes_cm_node {
 	spinlock_t                retrans_list_lock;
 	struct list_head          recv_list;
 	spinlock_t                recv_list_lock;
-	
+
 	int                       send_write0;
 	union {
-		struct ietf_mpa_frame mpa_frame;	
+		struct ietf_mpa_frame mpa_frame;
 		u8                    mpa_frame_buf[NES_CM_DEFAULT_MTU];
 	};
 	u16                       mpa_frame_size;
@@ -324,25 +324,25 @@ struct nes_cm_event {
 };
 
 struct nes_cm_core {
-	enum nes_cm_node_state  state;	
-	atomic_t                session_id;			
+	enum nes_cm_node_state  state;
+	atomic_t                session_id;
 
-	atomic_t                listen_node_cnt;			
-	struct nes_cm_node      listen_list;	
-	spinlock_t              listen_list_lock;	
+	atomic_t                listen_node_cnt;
+	struct nes_cm_node      listen_list;
+	spinlock_t              listen_list_lock;
 
-	u32                     mtu;						
+	u32                     mtu;
 	u32                     free_tx_pkt_max;
-	u32                     rx_pkt_posted;				
-	struct sk_buff_head     tx_free_list;	
-	atomic_t                ht_node_cnt;			
+	u32                     rx_pkt_posted;
+	struct sk_buff_head     tx_free_list;
+	atomic_t                ht_node_cnt;
 	struct list_head        connected_nodes;
 	/* struct list_head hashtable[NES_CM_HASHTABLE_SIZE]; */
-	spinlock_t              ht_lock;				
+	spinlock_t              ht_lock;
 
-	struct timer_list       tcp_timer;	
+	struct timer_list       tcp_timer;
 
-	struct nes_cm_ops       *api;			
+	struct nes_cm_ops       *api;
 
 	int (*post_event)(struct nes_cm_event *event);
 	atomic_t                events_posted;
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 3a21a08..674ce32 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -605,18 +605,18 @@ int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, u8  One
 
 	if (hw_rev != NE020_REV) {
 		/* init serdes 0 */
-		
+
 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL0, 0x000000FF);
 		if (!OneG_Mode) {
-			
+
 			nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_HIGHZ_LANE_MODE0, 0x11110000);
 		}
 		if (port_count > 1) {
 			/* init serdes 1 */
-			
+
 			nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000000FF);
 			if (!OneG_Mode) {
-				
+
 				nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_HIGHZ_LANE_MODE1, 0x11110000);
 			}
 		}
@@ -681,73 +681,73 @@ void nes_init_csr_ne020(struct nes_device *nesdev, u8 hw_rev, u8 port_count)
 
 	nes_debug(NES_DBG_INIT, "port_count=%d\n", port_count);
 
-	nes_write_indexed(nesdev, 0x000001E4, 0x00000007);	
-	/* nes_write_indexed(nesdev, 0x000001E8, 0x000208C4); */	
-	nes_write_indexed(nesdev, 0x000001E8, 0x00020844);	
-	nes_write_indexed(nesdev, 0x000001D8, 0x00048002);	
-	/* nes_write_indexed(nesdev, 0x000001D8, 0x0004B002); */  
-	nes_write_indexed(nesdev, 0x000001FC, 0x00050005);	
-	nes_write_indexed(nesdev, 0x00000600, 0x55555555);	
-	nes_write_indexed(nesdev, 0x00000604, 0x55555555);	
+	nes_write_indexed(nesdev, 0x000001E4, 0x00000007);
+	/* nes_write_indexed(nesdev, 0x000001E8, 0x000208C4); */
+	nes_write_indexed(nesdev, 0x000001E8, 0x00020844);
+	nes_write_indexed(nesdev, 0x000001D8, 0x00048002);
+	/* nes_write_indexed(nesdev, 0x000001D8, 0x0004B002); */
+	nes_write_indexed(nesdev, 0x000001FC, 0x00050005);
+	nes_write_indexed(nesdev, 0x00000600, 0x55555555);
+	nes_write_indexed(nesdev, 0x00000604, 0x55555555);
 
 	/* TODO: move these MAC register settings to NIC bringup */
-	nes_write_indexed(nesdev, 0x00002000, 0x00000001);	
-	nes_write_indexed(nesdev, 0x00002004, 0x00000001);	
-	nes_write_indexed(nesdev, 0x00002008, 0x0000FFFF);	
-	nes_write_indexed(nesdev, 0x0000200C, 0x00000001);	
-	nes_write_indexed(nesdev, 0x00002010, 0x000003c1);	
-	nes_write_indexed(nesdev, 0x0000201C, 0x75345678);	
+	nes_write_indexed(nesdev, 0x00002000, 0x00000001);
+	nes_write_indexed(nesdev, 0x00002004, 0x00000001);
+	nes_write_indexed(nesdev, 0x00002008, 0x0000FFFF);
+	nes_write_indexed(nesdev, 0x0000200C, 0x00000001);
+	nes_write_indexed(nesdev, 0x00002010, 0x000003c1);
+	nes_write_indexed(nesdev, 0x0000201C, 0x75345678);
 	if (port_count > 1) {
-		nes_write_indexed(nesdev, 0x00002200, 0x00000001);	
-		nes_write_indexed(nesdev, 0x00002204, 0x00000001);	
-		nes_write_indexed(nesdev, 0x00002208, 0x0000FFFF);	
-		nes_write_indexed(nesdev, 0x0000220C, 0x00000001);	
-		nes_write_indexed(nesdev, 0x00002210, 0x000003c1);	
-		nes_write_indexed(nesdev, 0x0000221C, 0x75345678);	
-		nes_write_indexed(nesdev, 0x00000908, 0x20000001);	
+		nes_write_indexed(nesdev, 0x00002200, 0x00000001);
+		nes_write_indexed(nesdev, 0x00002204, 0x00000001);
+		nes_write_indexed(nesdev, 0x00002208, 0x0000FFFF);
+		nes_write_indexed(nesdev, 0x0000220C, 0x00000001);
+		nes_write_indexed(nesdev, 0x00002210, 0x000003c1);
+		nes_write_indexed(nesdev, 0x0000221C, 0x75345678);
+		nes_write_indexed(nesdev, 0x00000908, 0x20000001);
 	}
 	if (port_count > 2) {
-		nes_write_indexed(nesdev, 0x00002400, 0x00000001);	
-		nes_write_indexed(nesdev, 0x00002404, 0x00000001);	
-		nes_write_indexed(nesdev, 0x00002408, 0x0000FFFF);	
-		nes_write_indexed(nesdev, 0x0000240C, 0x00000001);	
-		nes_write_indexed(nesdev, 0x00002410, 0x000003c1);	
-		nes_write_indexed(nesdev, 0x0000241C, 0x75345678);	
-		nes_write_indexed(nesdev, 0x00000910, 0x20000001);	
-
-		nes_write_indexed(nesdev, 0x00002600, 0x00000001);	
-		nes_write_indexed(nesdev, 0x00002604, 0x00000001);	
-		nes_write_indexed(nesdev, 0x00002608, 0x0000FFFF);	
-		nes_write_indexed(nesdev, 0x0000260C, 0x00000001);	
-		nes_write_indexed(nesdev, 0x00002610, 0x000003c1);	
-		nes_write_indexed(nesdev, 0x0000261C, 0x75345678);	
-		nes_write_indexed(nesdev, 0x00000918, 0x20000001);	
-	}
-
-	nes_write_indexed(nesdev, 0x00005000, 0x00018000);	
-	/* nes_write_indexed(nesdev, 0x00005000, 0x00010000); */  
-	nes_write_indexed(nesdev, 0x00005004, 0x00020001);	
-	nes_write_indexed(nesdev, 0x00005008, 0x1F1F1F1F);	
-	nes_write_indexed(nesdev, 0x00005010, 0x1F1F1F1F);	
-	nes_write_indexed(nesdev, 0x00005018, 0x1F1F1F1F);	
-	nes_write_indexed(nesdev, 0x00005020, 0x1F1F1F1F);	
-	nes_write_indexed(nesdev, 0x00006090, 0xFFFFFFFF);	
+		nes_write_indexed(nesdev, 0x00002400, 0x00000001);
+		nes_write_indexed(nesdev, 0x00002404, 0x00000001);
+		nes_write_indexed(nesdev, 0x00002408, 0x0000FFFF);
+		nes_write_indexed(nesdev, 0x0000240C, 0x00000001);
+		nes_write_indexed(nesdev, 0x00002410, 0x000003c1);
+		nes_write_indexed(nesdev, 0x0000241C, 0x75345678);
+		nes_write_indexed(nesdev, 0x00000910, 0x20000001);
+
+		nes_write_indexed(nesdev, 0x00002600, 0x00000001);
+		nes_write_indexed(nesdev, 0x00002604, 0x00000001);
+		nes_write_indexed(nesdev, 0x00002608, 0x0000FFFF);
+		nes_write_indexed(nesdev, 0x0000260C, 0x00000001);
+		nes_write_indexed(nesdev, 0x00002610, 0x000003c1);
+		nes_write_indexed(nesdev, 0x0000261C, 0x75345678);
+		nes_write_indexed(nesdev, 0x00000918, 0x20000001);
+	}
+
+	nes_write_indexed(nesdev, 0x00005000, 0x00018000);
+	/* nes_write_indexed(nesdev, 0x00005000, 0x00010000); */
+	nes_write_indexed(nesdev, 0x00005004, 0x00020001);
+	nes_write_indexed(nesdev, 0x00005008, 0x1F1F1F1F);
+	nes_write_indexed(nesdev, 0x00005010, 0x1F1F1F1F);
+	nes_write_indexed(nesdev, 0x00005018, 0x1F1F1F1F);
+	nes_write_indexed(nesdev, 0x00005020, 0x1F1F1F1F);
+	nes_write_indexed(nesdev, 0x00006090, 0xFFFFFFFF);
 
 	/* TODO: move this to code, get from EEPROM */
-	nes_write_indexed(nesdev, 0x00000900, 0x20000001);	
-	nes_write_indexed(nesdev, 0x000060C0, 0x0000028e);	
-	nes_write_indexed(nesdev, 0x000060C8, 0x00000020);	
+	nes_write_indexed(nesdev, 0x00000900, 0x20000001);
+	nes_write_indexed(nesdev, 0x000060C0, 0x0000028e);
+	nes_write_indexed(nesdev, 0x000060C8, 0x00000020);
 														//
-	nes_write_indexed(nesdev, 0x000001EC, 0x5b2625a0);	
-	/* nes_write_indexed(nesdev, 0x000001EC, 0x5f2625a0); */  
-	
+	nes_write_indexed(nesdev, 0x000001EC, 0x5b2625a0);
+	/* nes_write_indexed(nesdev, 0x000001EC, 0x5f2625a0); */
+
 	if (hw_rev != NE020_REV) {
 		u32temp = nes_read_indexed(nesdev, 0x000008e8);
-		u32temp |= 0x80000000;  
+		u32temp |= 0x80000000;
 		nes_write_indexed(nesdev, 0x000008e8, u32temp);
 		u32temp = nes_read_indexed(nesdev, 0x000021f8);
 		u32temp &= 0x7fffffff;
-		u32temp |= 0x7fff0010;  
+		u32temp |= 0x7fff0010;
 		nes_write_indexed(nesdev, 0x000021f8, u32temp);
 	}
 }
@@ -1435,7 +1435,7 @@ int nes_init_nic_qp(struct nes_device *nesdev, struct net_device *netdev)
 	nes_debug(NES_DBG_INIT, "RX_WINDOW_BUFFER_PAGE_TABLE_SIZE = 0x%08X, RX_WINDOW_BUFFER_SIZE = 0x%08X\n",
 			nes_read_indexed(nesdev, NES_IDX_RX_WINDOW_BUFFER_PAGE_TABLE_SIZE),
 			nes_read_indexed(nesdev, NES_IDX_RX_WINDOW_BUFFER_SIZE));
-	if (nes_read_indexed(nesdev, NES_IDX_RX_WINDOW_BUFFER_SIZE) != 0) {	
+	if (nes_read_indexed(nesdev, NES_IDX_RX_WINDOW_BUFFER_SIZE) != 0) {
 		nic_context->context_words[NES_NIC_CTX_MISC_IDX] |= cpu_to_le32(NES_NIC_BACK_STORE);
 	}
 
diff --git a/drivers/infiniband/hw/nes/nes_hw.h b/drivers/infiniband/hw/nes/nes_hw.h
index 51bb87f..178f3d5 100644
--- a/drivers/infiniband/hw/nes/nes_hw.h
+++ b/drivers/infiniband/hw/nes/nes_hw.h
@@ -624,8 +624,8 @@ enum nes_aeqe_bits {
 	NES_AEQE_VALID = (1<<31),
 };
 
-#define NES_AEQE_IWARP_STATE_SHIFT 	20
-#define NES_AEQE_TCP_STATE_SHIFT 	24
+#define NES_AEQE_IWARP_STATE_SHIFT	20
+#define NES_AEQE_TCP_STATE_SHIFT	24
 
 enum nes_aeqe_iwarp_state {
 	NES_AEQE_IWARP_STATE_NON_EXISTANT = 0,
@@ -1193,5 +1193,4 @@ struct nes_ib_device {
 #define nes_netif_rx netif_rx
 #endif
 
-#endif 		/* __NES_HW_H */
-
+#endif		/* __NES_HW_H */
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 4133a44..dcff1b8 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -257,7 +257,7 @@ static int nes_netdev_open(struct net_device *netdev)
 				((((u32)nesvnic->nic_index) << 16)));
 	}
 
-	
+
 	if (netdev->ip_ptr) {
 		struct in_device *ip = netdev->ip_ptr;
 		struct in_ifaddr *in = NULL;
@@ -276,11 +276,12 @@ static int nes_netdev_open(struct net_device *netdev)
 		/* Enable network packets */
 		nesvnic->linkup = 1;
 		netif_start_queue(netdev);
-		netif_carrier_on(netdev);
-	}
 #ifdef NES_NAPI
-	napi_enable(&nesvnic->napi);
+		napi_enable(&nesvnic->napi);
 #endif
+	} else {
+		netif_carrier_off(netdev);
+	}
 	nesvnic->netdev_open = 1;
 
 	return 0;
@@ -647,10 +648,10 @@ static int nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 				}
 				wqe_misc |= NES_NIC_SQ_WQE_COMPLETION | (u16)skb_is_gso(skb);
 				if ((tso_wqe_length + original_first_length) > skb_is_gso(skb)) {
-  					wqe_misc |= NES_NIC_SQ_WQE_LSO_ENABLE;
-  				} else {
+					wqe_misc |= NES_NIC_SQ_WQE_LSO_ENABLE;
+				} else {
 					iph->tot_len = htons(tso_wqe_length + original_first_length - nhoffset);
-  				}
+				}
 
 				nic_sqe->wqe_words[NES_NIC_SQ_WQE_MISC_IDX] = cpu_to_le32(wqe_misc);
 				nic_sqe->wqe_words[NES_NIC_SQ_WQE_LSO_INFO_IDX] =
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 36d34f4..ea7625a 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -899,7 +899,7 @@ static int nes_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
 		}
 		if (remap_pfn_range(vma, vma->vm_start,
 				virt_to_phys(nesqp->hwqp.sq_vbase) >> PAGE_SHIFT,
-				vma->vm_end - vma->vm_start,	
+				vma->vm_end - vma->vm_start,
 				vma->vm_page_prot)) {
 			nes_debug(NES_DBG_MMAP, "remap_pfn_range failed.\n");
 			return -EAGAIN;
@@ -1373,7 +1373,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
 						find_next_zero_bit(nes_ucontext->allocated_wqs,
 								   NES_MAX_USER_WQ_REGIONS, nes_ucontext->first_free_wq);
 					/* nes_debug(NES_DBG_QP, "find_first_zero_biton wqs returned %u\n",
-				   			nespd->mmap_db_index); */
+							nespd->mmap_db_index); */
 					if (nesqp->mmap_sq_db_index > NES_MAX_USER_WQ_REGIONS) {
 						nes_debug(NES_DBG_QP,
 							  "db index > max user regions, failing create QP\n");
diff --git a/drivers/infiniband/hw/nes/nes_verbs.h b/drivers/infiniband/hw/nes/nes_verbs.h
index b53e492..96d59ce 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.h
+++ b/drivers/infiniband/hw/nes/nes_verbs.h
@@ -46,11 +46,11 @@ struct nes_ucontext {
 	unsigned long      mmap_wq_offset;
 	unsigned long      mmap_cq_offset; /* to be removed */
 	int                index;		/* rnic index (minor) */
-	unsigned long      allocated_doorbells[BITS_TO_LONGS(NES_MAX_USER_DB_REGIONS)];	
-	u16                mmap_db_index[NES_MAX_USER_DB_REGIONS];	 
+	unsigned long      allocated_doorbells[BITS_TO_LONGS(NES_MAX_USER_DB_REGIONS)];
+	u16                mmap_db_index[NES_MAX_USER_DB_REGIONS];
 	u16                first_free_db;
-	unsigned long      allocated_wqs[BITS_TO_LONGS(NES_MAX_USER_WQ_REGIONS)];  
-	struct nes_qp      *mmap_nesqp[NES_MAX_USER_WQ_REGIONS];  
+	unsigned long      allocated_wqs[BITS_TO_LONGS(NES_MAX_USER_WQ_REGIONS)];
+	struct nes_qp      *mmap_nesqp[NES_MAX_USER_WQ_REGIONS];
 	u16                first_free_wq;
 	struct list_head   cq_reg_mem_list;
 	struct list_head   qp_reg_mem_list;
@@ -72,7 +72,7 @@ struct nes_mr {
 	struct ib_umem    *region;
 	u16               pbls_used;
 	u8                mode;
-	u8                pbl_4k; 
+	u8                pbl_4k;
 };
 
 struct nes_hw_pb {



More information about the general mailing list