aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2007-10-23 22:57:54 -0400
committerRoland Dreier <rolandd@cisco.com>2008-01-25 17:15:23 -0500
commit2337f80941ac22f747ce6fd2c7a79e91d911a3ce (patch)
treee813aa78a5ec8fc07bad4826ac083ac83ae35f5c /drivers/infiniband/ulp
parent657c2f2cbccbac88689ac5174fc13dd3f9aece34 (diff)
IPoIB: Trivial formatting cleanups
Fix whitespace blunders, convert "foo* bar" to "foo *bar", etc. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib.h152
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_cm.c48
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c8
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c38
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c4
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_verbs.c10
6 files changed, 130 insertions, 130 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index eb7edab0e836..a376fb6ffa0e 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -56,42 +56,42 @@
56/* constants */ 56/* constants */
57 57
58enum { 58enum {
59 IPOIB_PACKET_SIZE = 2048, 59 IPOIB_PACKET_SIZE = 2048,
60 IPOIB_BUF_SIZE = IPOIB_PACKET_SIZE + IB_GRH_BYTES, 60 IPOIB_BUF_SIZE = IPOIB_PACKET_SIZE + IB_GRH_BYTES,
61 61
62 IPOIB_ENCAP_LEN = 4, 62 IPOIB_ENCAP_LEN = 4,
63 63
64 IPOIB_CM_MTU = 0x10000 - 0x10, /* padding to align header to 16 */ 64 IPOIB_CM_MTU = 0x10000 - 0x10, /* padding to align header to 16 */
65 IPOIB_CM_BUF_SIZE = IPOIB_CM_MTU + IPOIB_ENCAP_LEN, 65 IPOIB_CM_BUF_SIZE = IPOIB_CM_MTU + IPOIB_ENCAP_LEN,
66 IPOIB_CM_HEAD_SIZE = IPOIB_CM_BUF_SIZE % PAGE_SIZE, 66 IPOIB_CM_HEAD_SIZE = IPOIB_CM_BUF_SIZE % PAGE_SIZE,
67 IPOIB_CM_RX_SG = ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE) / PAGE_SIZE, 67 IPOIB_CM_RX_SG = ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE) / PAGE_SIZE,
68 IPOIB_RX_RING_SIZE = 128, 68 IPOIB_RX_RING_SIZE = 128,
69 IPOIB_TX_RING_SIZE = 64, 69 IPOIB_TX_RING_SIZE = 64,
70 IPOIB_MAX_QUEUE_SIZE = 8192, 70 IPOIB_MAX_QUEUE_SIZE = 8192,
71 IPOIB_MIN_QUEUE_SIZE = 2, 71 IPOIB_MIN_QUEUE_SIZE = 2,
72 72
73 IPOIB_NUM_WC = 4, 73 IPOIB_NUM_WC = 4,
74 74
75 IPOIB_MAX_PATH_REC_QUEUE = 3, 75 IPOIB_MAX_PATH_REC_QUEUE = 3,
76 IPOIB_MAX_MCAST_QUEUE = 3, 76 IPOIB_MAX_MCAST_QUEUE = 3,
77 77
78 IPOIB_FLAG_OPER_UP = 0, 78 IPOIB_FLAG_OPER_UP = 0,
79 IPOIB_FLAG_INITIALIZED = 1, 79 IPOIB_FLAG_INITIALIZED = 1,
80 IPOIB_FLAG_ADMIN_UP = 2, 80 IPOIB_FLAG_ADMIN_UP = 2,
81 IPOIB_PKEY_ASSIGNED = 3, 81 IPOIB_PKEY_ASSIGNED = 3,
82 IPOIB_PKEY_STOP = 4, 82 IPOIB_PKEY_STOP = 4,
83 IPOIB_FLAG_SUBINTERFACE = 5, 83 IPOIB_FLAG_SUBINTERFACE = 5,
84 IPOIB_MCAST_RUN = 6, 84 IPOIB_MCAST_RUN = 6,
85 IPOIB_STOP_REAPER = 7, 85 IPOIB_STOP_REAPER = 7,
86 IPOIB_MCAST_STARTED = 8, 86 IPOIB_MCAST_STARTED = 8,
87 IPOIB_FLAG_ADMIN_CM = 9, 87 IPOIB_FLAG_ADMIN_CM = 9,
88 IPOIB_FLAG_UMCAST = 10, 88 IPOIB_FLAG_UMCAST = 10,
89 89
90 IPOIB_MAX_BACKOFF_SECONDS = 16, 90 IPOIB_MAX_BACKOFF_SECONDS = 16,
91 91
92 IPOIB_MCAST_FLAG_FOUND = 0, /* used in set_multicast_list */ 92 IPOIB_MCAST_FLAG_FOUND = 0, /* used in set_multicast_list */
93 IPOIB_MCAST_FLAG_SENDONLY = 1, 93 IPOIB_MCAST_FLAG_SENDONLY = 1,
94 IPOIB_MCAST_FLAG_BUSY = 2, /* joining or already joined */ 94 IPOIB_MCAST_FLAG_BUSY = 2, /* joining or already joined */
95 IPOIB_MCAST_FLAG_ATTACHED = 3, 95 IPOIB_MCAST_FLAG_ATTACHED = 3,
96}; 96};
97 97
@@ -117,7 +117,7 @@ struct ipoib_pseudoheader {
117struct ipoib_mcast { 117struct ipoib_mcast {
118 struct ib_sa_mcmember_rec mcmember; 118 struct ib_sa_mcmember_rec mcmember;
119 struct ib_sa_multicast *mc; 119 struct ib_sa_multicast *mc;
120 struct ipoib_ah *ah; 120 struct ipoib_ah *ah;
121 121
122 struct rb_node rb_node; 122 struct rb_node rb_node;
123 struct list_head list; 123 struct list_head list;
@@ -186,27 +186,27 @@ enum ipoib_cm_state {
186}; 186};
187 187
188struct ipoib_cm_rx { 188struct ipoib_cm_rx {
189 struct ib_cm_id *id; 189 struct ib_cm_id *id;
190 struct ib_qp *qp; 190 struct ib_qp *qp;
191 struct list_head list; 191 struct list_head list;
192 struct net_device *dev; 192 struct net_device *dev;
193 unsigned long jiffies; 193 unsigned long jiffies;
194 enum ipoib_cm_state state; 194 enum ipoib_cm_state state;
195}; 195};
196 196
197struct ipoib_cm_tx { 197struct ipoib_cm_tx {
198 struct ib_cm_id *id; 198 struct ib_cm_id *id;
199 struct ib_qp *qp; 199 struct ib_qp *qp;
200 struct list_head list; 200 struct list_head list;
201 struct net_device *dev; 201 struct net_device *dev;
202 struct ipoib_neigh *neigh; 202 struct ipoib_neigh *neigh;
203 struct ipoib_path *path; 203 struct ipoib_path *path;
204 struct ipoib_tx_buf *tx_ring; 204 struct ipoib_tx_buf *tx_ring;
205 unsigned tx_head; 205 unsigned tx_head;
206 unsigned tx_tail; 206 unsigned tx_tail;
207 unsigned long flags; 207 unsigned long flags;
208 u32 mtu; 208 u32 mtu;
209 struct ib_wc ibwc[IPOIB_NUM_WC]; 209 struct ib_wc ibwc[IPOIB_NUM_WC];
210}; 210};
211 211
212struct ipoib_cm_rx_buf { 212struct ipoib_cm_rx_buf {
@@ -215,24 +215,24 @@ struct ipoib_cm_rx_buf {
215}; 215};
216 216
217struct ipoib_cm_dev_priv { 217struct ipoib_cm_dev_priv {
218 struct ib_srq *srq; 218 struct ib_srq *srq;
219 struct ipoib_cm_rx_buf *srq_ring; 219 struct ipoib_cm_rx_buf *srq_ring;
220 struct ib_cm_id *id; 220 struct ib_cm_id *id;
221 struct list_head passive_ids; /* state: LIVE */ 221 struct list_head passive_ids; /* state: LIVE */
222 struct list_head rx_error_list; /* state: ERROR */ 222 struct list_head rx_error_list; /* state: ERROR */
223 struct list_head rx_flush_list; /* state: FLUSH, drain not started */ 223 struct list_head rx_flush_list; /* state: FLUSH, drain not started */
224 struct list_head rx_drain_list; /* state: FLUSH, drain started */ 224 struct list_head rx_drain_list; /* state: FLUSH, drain started */
225 struct list_head rx_reap_list; /* state: FLUSH, drain done */ 225 struct list_head rx_reap_list; /* state: FLUSH, drain done */
226 struct work_struct start_task; 226 struct work_struct start_task;
227 struct work_struct reap_task; 227 struct work_struct reap_task;
228 struct work_struct skb_task; 228 struct work_struct skb_task;
229 struct work_struct rx_reap_task; 229 struct work_struct rx_reap_task;
230 struct delayed_work stale_task; 230 struct delayed_work stale_task;
231 struct sk_buff_head skb_queue; 231 struct sk_buff_head skb_queue;
232 struct list_head start_list; 232 struct list_head start_list;
233 struct list_head reap_list; 233 struct list_head reap_list;
234 struct ib_wc ibwc[IPOIB_NUM_WC]; 234 struct ib_wc ibwc[IPOIB_NUM_WC];
235 struct ib_sge rx_sge[IPOIB_CM_RX_SG]; 235 struct ib_sge rx_sge[IPOIB_CM_RX_SG];
236 struct ib_recv_wr rx_wr; 236 struct ib_recv_wr rx_wr;
237}; 237};
238 238
@@ -269,30 +269,30 @@ struct ipoib_dev_priv {
269 struct work_struct pkey_event_task; 269 struct work_struct pkey_event_task;
270 270
271 struct ib_device *ca; 271 struct ib_device *ca;
272 u8 port; 272 u8 port;
273 u16 pkey; 273 u16 pkey;
274 u16 pkey_index; 274 u16 pkey_index;
275 struct ib_pd *pd; 275 struct ib_pd *pd;
276 struct ib_mr *mr; 276 struct ib_mr *mr;
277 struct ib_cq *cq; 277 struct ib_cq *cq;
278 struct ib_qp *qp; 278 struct ib_qp *qp;
279 u32 qkey; 279 u32 qkey;
280 280
281 union ib_gid local_gid; 281 union ib_gid local_gid;
282 u16 local_lid; 282 u16 local_lid;
283 283
284 unsigned int admin_mtu; 284 unsigned int admin_mtu;
285 unsigned int mcast_mtu; 285 unsigned int mcast_mtu;
286 286
287 struct ipoib_rx_buf *rx_ring; 287 struct ipoib_rx_buf *rx_ring;
288 288
289 spinlock_t tx_lock; 289 spinlock_t tx_lock;
290 struct ipoib_tx_buf *tx_ring; 290 struct ipoib_tx_buf *tx_ring;
291 unsigned tx_head; 291 unsigned tx_head;
292 unsigned tx_tail; 292 unsigned tx_tail;
293 struct ib_sge tx_sge; 293 struct ib_sge tx_sge;
294 struct ib_send_wr tx_wr; 294 struct ib_send_wr tx_wr;
295 unsigned tx_outstanding; 295 unsigned tx_outstanding;
296 296
297 struct ib_wc ibwc[IPOIB_NUM_WC]; 297 struct ib_wc ibwc[IPOIB_NUM_WC];
298 298
@@ -317,10 +317,10 @@ struct ipoib_dev_priv {
317 317
318struct ipoib_ah { 318struct ipoib_ah {
319 struct net_device *dev; 319 struct net_device *dev;
320 struct ib_ah *ah; 320 struct ib_ah *ah;
321 struct list_head list; 321 struct list_head list;
322 struct kref ref; 322 struct kref ref;
323 unsigned last_send; 323 unsigned last_send;
324}; 324};
325 325
326struct ipoib_path { 326struct ipoib_path {
@@ -331,11 +331,11 @@ struct ipoib_path {
331 331
332 struct list_head neigh_list; 332 struct list_head neigh_list;
333 333
334 int query_id; 334 int query_id;
335 struct ib_sa_query *query; 335 struct ib_sa_query *query;
336 struct completion done; 336 struct completion done;
337 337
338 struct rb_node rb_node; 338 struct rb_node rb_node;
339 struct list_head list; 339 struct list_head list;
340}; 340};
341 341
@@ -344,7 +344,7 @@ struct ipoib_neigh {
344#ifdef CONFIG_INFINIBAND_IPOIB_CM 344#ifdef CONFIG_INFINIBAND_IPOIB_CM
345 struct ipoib_cm_tx *cm; 345 struct ipoib_cm_tx *cm;
346#endif 346#endif
347 union ib_gid dgid; 347 union ib_gid dgid;
348 struct sk_buff_head queue; 348 struct sk_buff_head queue;
349 349
350 struct neighbour *neighbour; 350 struct neighbour *neighbour;
@@ -455,8 +455,8 @@ void ipoib_drain_cq(struct net_device *dev);
455 455
456#ifdef CONFIG_INFINIBAND_IPOIB_CM 456#ifdef CONFIG_INFINIBAND_IPOIB_CM
457 457
458#define IPOIB_FLAGS_RC 0x80 458#define IPOIB_FLAGS_RC 0x80
459#define IPOIB_FLAGS_UC 0x40 459#define IPOIB_FLAGS_UC 0x40
460 460
461/* We don't support UC connections at the moment */ 461/* We don't support UC connections at the moment */
462#define IPOIB_CM_SUPPORTED(ha) (ha[0] & (IPOIB_FLAGS_RC)) 462#define IPOIB_CM_SUPPORTED(ha) (ha[0] & (IPOIB_FLAGS_RC))
@@ -500,7 +500,7 @@ void ipoib_cm_dev_cleanup(struct net_device *dev);
500struct ipoib_cm_tx *ipoib_cm_create_tx(struct net_device *dev, struct ipoib_path *path, 500struct ipoib_cm_tx *ipoib_cm_create_tx(struct net_device *dev, struct ipoib_path *path,
501 struct ipoib_neigh *neigh); 501 struct ipoib_neigh *neigh);
502void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx); 502void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx);
503void ipoib_cm_skb_too_long(struct net_device* dev, struct sk_buff *skb, 503void ipoib_cm_skb_too_long(struct net_device *dev, struct sk_buff *skb,
504 unsigned int mtu); 504 unsigned int mtu);
505void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc); 505void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc);
506void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc); 506void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc);
@@ -582,7 +582,7 @@ int ipoib_cm_add_mode_attr(struct net_device *dev)
582 return 0; 582 return 0;
583} 583}
584 584
585static inline void ipoib_cm_skb_too_long(struct net_device* dev, struct sk_buff *skb, 585static inline void ipoib_cm_skb_too_long(struct net_device *dev, struct sk_buff *skb,
586 unsigned int mtu) 586 unsigned int mtu)
587{ 587{
588 dev_kfree_skb_any(skb); 588 dev_kfree_skb_any(skb);
@@ -624,12 +624,12 @@ extern struct ib_sa_client ipoib_sa_client;
624extern int ipoib_debug_level; 624extern int ipoib_debug_level;
625 625
626#define ipoib_dbg(priv, format, arg...) \ 626#define ipoib_dbg(priv, format, arg...) \
627 do { \ 627 do { \
628 if (ipoib_debug_level > 0) \ 628 if (ipoib_debug_level > 0) \
629 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \ 629 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
630 } while (0) 630 } while (0)
631#define ipoib_dbg_mcast(priv, format, arg...) \ 631#define ipoib_dbg_mcast(priv, format, arg...) \
632 do { \ 632 do { \
633 if (mcast_debug_level > 0) \ 633 if (mcast_debug_level > 0) \
634 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \ 634 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
635 } while (0) 635 } while (0)
@@ -642,7 +642,7 @@ extern int ipoib_debug_level;
642 642
643#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA 643#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA
644#define ipoib_dbg_data(priv, format, arg...) \ 644#define ipoib_dbg_data(priv, format, arg...) \
645 do { \ 645 do { \
646 if (data_debug_level > 0) \ 646 if (data_debug_level > 0) \
647 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \ 647 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
648 } while (0) 648 } while (0)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 059cf92b60a5..5d2da1676928 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -155,7 +155,7 @@ partial_error:
155 return NULL; 155 return NULL;
156} 156}
157 157
158static void ipoib_cm_start_rx_drain(struct ipoib_dev_priv* priv) 158static void ipoib_cm_start_rx_drain(struct ipoib_dev_priv *priv)
159{ 159{
160 struct ib_send_wr *bad_wr; 160 struct ib_send_wr *bad_wr;
161 struct ipoib_cm_rx *p; 161 struct ipoib_cm_rx *p;
@@ -495,10 +495,10 @@ static inline int post_send(struct ipoib_dev_priv *priv,
495{ 495{
496 struct ib_send_wr *bad_wr; 496 struct ib_send_wr *bad_wr;
497 497
498 priv->tx_sge.addr = addr; 498 priv->tx_sge.addr = addr;
499 priv->tx_sge.length = len; 499 priv->tx_sge.length = len;
500 500
501 priv->tx_wr.wr_id = wr_id | IPOIB_OP_CM; 501 priv->tx_wr.wr_id = wr_id | IPOIB_OP_CM;
502 502
503 return ib_post_send(tx->qp, &priv->tx_wr, &bad_wr); 503 return ib_post_send(tx->qp, &priv->tx_wr, &bad_wr);
504} 504}
@@ -540,7 +540,7 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
540 tx_req->mapping = addr; 540 tx_req->mapping = addr;
541 541
542 if (unlikely(post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1), 542 if (unlikely(post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1),
543 addr, skb->len))) { 543 addr, skb->len))) {
544 ipoib_warn(priv, "post_send failed\n"); 544 ipoib_warn(priv, "post_send failed\n");
545 ++dev->stats.tx_errors; 545 ++dev->stats.tx_errors;
546 ib_dma_unmap_single(priv->ca, addr, skb->len, DMA_TO_DEVICE); 546 ib_dma_unmap_single(priv->ca, addr, skb->len, DMA_TO_DEVICE);
@@ -799,7 +799,7 @@ static struct ib_qp *ipoib_cm_create_tx_qp(struct net_device *dev, struct ipoib_
799 .sq_sig_type = IB_SIGNAL_ALL_WR, 799 .sq_sig_type = IB_SIGNAL_ALL_WR,
800 .qp_type = IB_QPT_RC, 800 .qp_type = IB_QPT_RC,
801 .qp_context = tx 801 .qp_context = tx
802 }; 802 };
803 803
804 return ib_create_qp(priv->pd, &attr); 804 return ib_create_qp(priv->pd, &attr);
805} 805}
@@ -816,28 +816,28 @@ static int ipoib_cm_send_req(struct net_device *dev,
816 data.qpn = cpu_to_be32(priv->qp->qp_num); 816 data.qpn = cpu_to_be32(priv->qp->qp_num);
817 data.mtu = cpu_to_be32(IPOIB_CM_BUF_SIZE); 817 data.mtu = cpu_to_be32(IPOIB_CM_BUF_SIZE);
818 818
819 req.primary_path = pathrec; 819 req.primary_path = pathrec;
820 req.alternate_path = NULL; 820 req.alternate_path = NULL;
821 req.service_id = cpu_to_be64(IPOIB_CM_IETF_ID | qpn); 821 req.service_id = cpu_to_be64(IPOIB_CM_IETF_ID | qpn);
822 req.qp_num = qp->qp_num; 822 req.qp_num = qp->qp_num;
823 req.qp_type = qp->qp_type; 823 req.qp_type = qp->qp_type;
824 req.private_data = &data; 824 req.private_data = &data;
825 req.private_data_len = sizeof data; 825 req.private_data_len = sizeof data;
826 req.flow_control = 0; 826 req.flow_control = 0;
827 827
828 req.starting_psn = 0; /* FIXME */ 828 req.starting_psn = 0; /* FIXME */
829 829
830 /* 830 /*
831 * Pick some arbitrary defaults here; we could make these 831 * Pick some arbitrary defaults here; we could make these
832 * module parameters if anyone cared about setting them. 832 * module parameters if anyone cared about setting them.
833 */ 833 */
834 req.responder_resources = 4; 834 req.responder_resources = 4;
835 req.remote_cm_response_timeout = 20; 835 req.remote_cm_response_timeout = 20;
836 req.local_cm_response_timeout = 20; 836 req.local_cm_response_timeout = 20;
837 req.retry_count = 0; /* RFC draft warns against retries */ 837 req.retry_count = 0; /* RFC draft warns against retries */
838 req.rnr_retry_count = 0; /* RFC draft warns against retries */ 838 req.rnr_retry_count = 0; /* RFC draft warns against retries */
839 req.max_cm_retries = 15; 839 req.max_cm_retries = 15;
840 req.srq = 1; 840 req.srq = 1;
841 return ib_send_cm_req(id, &req); 841 return ib_send_cm_req(id, &req);
842} 842}
843 843
@@ -1150,7 +1150,7 @@ static void ipoib_cm_skb_reap(struct work_struct *work)
1150 spin_unlock_irq(&priv->tx_lock); 1150 spin_unlock_irq(&priv->tx_lock);
1151} 1151}
1152 1152
1153void ipoib_cm_skb_too_long(struct net_device* dev, struct sk_buff *skb, 1153void ipoib_cm_skb_too_long(struct net_device *dev, struct sk_buff *skb,
1154 unsigned int mtu) 1154 unsigned int mtu)
1155{ 1155{
1156 struct ipoib_dev_priv *priv = netdev_priv(dev); 1156 struct ipoib_dev_priv *priv = netdev_priv(dev);
@@ -1212,7 +1212,7 @@ static void ipoib_cm_stale_task(struct work_struct *work)
1212} 1212}
1213 1213
1214 1214
1215static ssize_t show_mode(struct device *d, struct device_attribute *attr, 1215static ssize_t show_mode(struct device *d, struct device_attribute *attr,
1216 char *buf) 1216 char *buf)
1217{ 1217{
1218 struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(d)); 1218 struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(d));
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 5063dd509ad2..52bc2bd5799a 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -345,12 +345,12 @@ static inline int post_send(struct ipoib_dev_priv *priv,
345{ 345{
346 struct ib_send_wr *bad_wr; 346 struct ib_send_wr *bad_wr;
347 347
348 priv->tx_sge.addr = addr; 348 priv->tx_sge.addr = addr;
349 priv->tx_sge.length = len; 349 priv->tx_sge.length = len;
350 350
351 priv->tx_wr.wr_id = wr_id; 351 priv->tx_wr.wr_id = wr_id;
352 priv->tx_wr.wr.ud.remote_qpn = qpn; 352 priv->tx_wr.wr.ud.remote_qpn = qpn;
353 priv->tx_wr.wr.ud.ah = address; 353 priv->tx_wr.wr.ud.ah = address;
354 354
355 return ib_post_send(priv->qp, &priv->tx_wr, &bad_wr); 355 return ib_post_send(priv->qp, &priv->tx_wr, &bad_wr);
356} 356}
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index c9f6077b615e..5a9c3b5a39ef 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -474,8 +474,8 @@ static struct ipoib_path *path_rec_create(struct net_device *dev, void *gid)
474 INIT_LIST_HEAD(&path->neigh_list); 474 INIT_LIST_HEAD(&path->neigh_list);
475 475
476 memcpy(path->pathrec.dgid.raw, gid, sizeof (union ib_gid)); 476 memcpy(path->pathrec.dgid.raw, gid, sizeof (union ib_gid));
477 path->pathrec.sgid = priv->local_gid; 477 path->pathrec.sgid = priv->local_gid;
478 path->pathrec.pkey = cpu_to_be16(priv->pkey); 478 path->pathrec.pkey = cpu_to_be16(priv->pkey);
479 path->pathrec.numb_path = 1; 479 path->pathrec.numb_path = 1;
480 path->pathrec.traffic_class = priv->broadcast->mcmember.traffic_class; 480 path->pathrec.traffic_class = priv->broadcast->mcmember.traffic_class;
481 481
@@ -950,34 +950,34 @@ static void ipoib_setup(struct net_device *dev)
950{ 950{
951 struct ipoib_dev_priv *priv = netdev_priv(dev); 951 struct ipoib_dev_priv *priv = netdev_priv(dev);
952 952
953 dev->open = ipoib_open; 953 dev->open = ipoib_open;
954 dev->stop = ipoib_stop; 954 dev->stop = ipoib_stop;
955 dev->change_mtu = ipoib_change_mtu; 955 dev->change_mtu = ipoib_change_mtu;
956 dev->hard_start_xmit = ipoib_start_xmit; 956 dev->hard_start_xmit = ipoib_start_xmit;
957 dev->tx_timeout = ipoib_timeout; 957 dev->tx_timeout = ipoib_timeout;
958 dev->header_ops = &ipoib_header_ops; 958 dev->header_ops = &ipoib_header_ops;
959 dev->set_multicast_list = ipoib_set_mcast_list; 959 dev->set_multicast_list = ipoib_set_mcast_list;
960 dev->neigh_setup = ipoib_neigh_setup_dev; 960 dev->neigh_setup = ipoib_neigh_setup_dev;
961 961
962 netif_napi_add(dev, &priv->napi, ipoib_poll, 100); 962 netif_napi_add(dev, &priv->napi, ipoib_poll, 100);
963 963
964 dev->watchdog_timeo = HZ; 964 dev->watchdog_timeo = HZ;
965 965
966 dev->flags |= IFF_BROADCAST | IFF_MULTICAST; 966 dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
967 967
968 /* 968 /*
969 * We add in INFINIBAND_ALEN to allow for the destination 969 * We add in INFINIBAND_ALEN to allow for the destination
970 * address "pseudoheader" for skbs without neighbour struct. 970 * address "pseudoheader" for skbs without neighbour struct.
971 */ 971 */
972 dev->hard_header_len = IPOIB_ENCAP_LEN + INFINIBAND_ALEN; 972 dev->hard_header_len = IPOIB_ENCAP_LEN + INFINIBAND_ALEN;
973 dev->addr_len = INFINIBAND_ALEN; 973 dev->addr_len = INFINIBAND_ALEN;
974 dev->type = ARPHRD_INFINIBAND; 974 dev->type = ARPHRD_INFINIBAND;
975 dev->tx_queue_len = ipoib_sendq_size * 2; 975 dev->tx_queue_len = ipoib_sendq_size * 2;
976 dev->features = NETIF_F_VLAN_CHALLENGED | NETIF_F_LLTX; 976 dev->features = NETIF_F_VLAN_CHALLENGED | NETIF_F_LLTX;
977 977
978 /* MTU will be reset when mcast join happens */ 978 /* MTU will be reset when mcast join happens */
979 dev->mtu = IPOIB_PACKET_SIZE - IPOIB_ENCAP_LEN; 979 dev->mtu = IPOIB_PACKET_SIZE - IPOIB_ENCAP_LEN;
980 priv->mcast_mtu = priv->admin_mtu = dev->mtu; 980 priv->mcast_mtu = priv->admin_mtu = dev->mtu;
981 981
982 memcpy(dev->broadcast, ipv4_bcast_addr, INFINIBAND_ALEN); 982 memcpy(dev->broadcast, ipv4_bcast_addr, INFINIBAND_ALEN);
983 983
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 9bcfc7ad6aa6..858ada17f980 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -702,7 +702,7 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb)
702 702
703out: 703out:
704 if (mcast && mcast->ah) { 704 if (mcast && mcast->ah) {
705 if (skb->dst && 705 if (skb->dst &&
706 skb->dst->neighbour && 706 skb->dst->neighbour &&
707 !*to_ipoib_neigh(skb->dst->neighbour)) { 707 !*to_ipoib_neigh(skb->dst->neighbour)) {
708 struct ipoib_neigh *neigh = ipoib_neigh_alloc(skb->dst->neighbour, 708 struct ipoib_neigh *neigh = ipoib_neigh_alloc(skb->dst->neighbour,
@@ -710,7 +710,7 @@ out:
710 710
711 if (neigh) { 711 if (neigh) {
712 kref_get(&mcast->ah->ref); 712 kref_get(&mcast->ah->ref);
713 neigh->ah = mcast->ah; 713 neigh->ah = mcast->ah;
714 list_add_tail(&neigh->list, &mcast->neigh_list); 714 list_add_tail(&neigh->list, &mcast->neigh_list);
715 } 715 }
716 } 716 }
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
index 3c6e45db0ab5..b6848a8d35db 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
@@ -197,12 +197,12 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca)
197 priv->dev->dev_addr[2] = (priv->qp->qp_num >> 8) & 0xff; 197 priv->dev->dev_addr[2] = (priv->qp->qp_num >> 8) & 0xff;
198 priv->dev->dev_addr[3] = (priv->qp->qp_num ) & 0xff; 198 priv->dev->dev_addr[3] = (priv->qp->qp_num ) & 0xff;
199 199
200 priv->tx_sge.lkey = priv->mr->lkey; 200 priv->tx_sge.lkey = priv->mr->lkey;
201 201
202 priv->tx_wr.opcode = IB_WR_SEND; 202 priv->tx_wr.opcode = IB_WR_SEND;
203 priv->tx_wr.sg_list = &priv->tx_sge; 203 priv->tx_wr.sg_list = &priv->tx_sge;
204 priv->tx_wr.num_sge = 1; 204 priv->tx_wr.num_sge = 1;
205 priv->tx_wr.send_flags = IB_SEND_SIGNALED; 205 priv->tx_wr.send_flags = IB_SEND_SIGNALED;
206 206
207 return 0; 207 return 0;
208 208