aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:49:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:49:40 -0500
commit0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch)
tree454d1842b1833d976da62abcbd5c47521ebe9bd7 /drivers/infiniband/ulp
parent54a696bd07c14d3b1192d03ce7269bc59b45209a (diff)
parenteb56092fc168bf5af199d47af50c0d84a96db898 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits) net: Allow dependancies of FDDI & Tokenring to be modular. igb: Fix build warning when DCA is disabled. net: Fix warning fallout from recent NAPI interface changes. gro: Fix potential use after free sfc: If AN is enabled, always read speed/duplex from the AN advertising bits sfc: When disabling the NIC, close the device rather than unregistering it sfc: SFT9001: Add cable diagnostics sfc: Add support for multiple PHY self-tests sfc: Merge top-level functions for self-tests sfc: Clean up PHY mode management in loopback self-test sfc: Fix unreliable link detection in some loopback modes sfc: Generate unique names for per-NIC workqueues 802.3ad: use standard ethhdr instead of ad_header 802.3ad: generalize out mac address initializer 802.3ad: initialize ports LACPDU from const initializer 802.3ad: remove typedef around ad_system 802.3ad: turn ports is_individual into a bool 802.3ad: turn ports is_enabled into a bool 802.3ad: make ntt bool ixgbe: Fix set_ringparam in ixgbe to use the same memory pools. ... Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due to the conversion to %pI (in this networking merge) and the addition of doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib.h23
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_cm.c8
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c6
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c25
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c70
-rw-r--r--drivers/infiniband/ulp/iser/iser_verbs.c8
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c31
7 files changed, 56 insertions, 115 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index e0c7dfabf2b4..753a983a5fdc 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -732,29 +732,6 @@ extern int ipoib_debug_level;
732 do { (void) (priv); } while (0) 732 do { (void) (priv); } while (0)
733#endif /* CONFIG_INFINIBAND_IPOIB_DEBUG_DATA */ 733#endif /* CONFIG_INFINIBAND_IPOIB_DEBUG_DATA */
734 734
735
736#define IPOIB_GID_FMT "%2.2x%2.2x:%2.2x%2.2x:%2.2x%2.2x:%2.2x%2.2x:" \
737 "%2.2x%2.2x:%2.2x%2.2x:%2.2x%2.2x:%2.2x%2.2x"
738
739#define IPOIB_GID_RAW_ARG(gid) ((u8 *)(gid))[0], \
740 ((u8 *)(gid))[1], \
741 ((u8 *)(gid))[2], \
742 ((u8 *)(gid))[3], \
743 ((u8 *)(gid))[4], \
744 ((u8 *)(gid))[5], \
745 ((u8 *)(gid))[6], \
746 ((u8 *)(gid))[7], \
747 ((u8 *)(gid))[8], \
748 ((u8 *)(gid))[9], \
749 ((u8 *)(gid))[10],\
750 ((u8 *)(gid))[11],\
751 ((u8 *)(gid))[12],\
752 ((u8 *)(gid))[13],\
753 ((u8 *)(gid))[14],\
754 ((u8 *)(gid))[15]
755
756#define IPOIB_GID_ARG(gid) IPOIB_GID_RAW_ARG((gid).raw)
757
758#define IPOIB_QPN(ha) (be32_to_cpup((__be32 *) ha) & 0xffffff) 735#define IPOIB_QPN(ha) (be32_to_cpup((__be32 *) ha) & 0xffffff)
759 736
760#endif /* _IPOIB_H */ 737#endif /* _IPOIB_H */
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 7b14c2c39500..47d588ba2a7f 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -1128,8 +1128,8 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
1128 goto err_send_cm; 1128 goto err_send_cm;
1129 } 1129 }
1130 1130
1131 ipoib_dbg(priv, "Request connection 0x%x for gid " IPOIB_GID_FMT " qpn 0x%x\n", 1131 ipoib_dbg(priv, "Request connection 0x%x for gid %pI6 qpn 0x%x\n",
1132 p->qp->qp_num, IPOIB_GID_ARG(pathrec->dgid), qpn); 1132 p->qp->qp_num, pathrec->dgid.raw, qpn);
1133 1133
1134 return 0; 1134 return 0;
1135 1135
@@ -1276,8 +1276,8 @@ void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx)
1276 if (test_and_clear_bit(IPOIB_FLAG_INITIALIZED, &tx->flags)) { 1276 if (test_and_clear_bit(IPOIB_FLAG_INITIALIZED, &tx->flags)) {
1277 list_move(&tx->list, &priv->cm.reap_list); 1277 list_move(&tx->list, &priv->cm.reap_list);
1278 queue_work(ipoib_workqueue, &priv->cm.reap_task); 1278 queue_work(ipoib_workqueue, &priv->cm.reap_task);
1279 ipoib_dbg(priv, "Reap connection for gid " IPOIB_GID_FMT "\n", 1279 ipoib_dbg(priv, "Reap connection for gid %pI6\n",
1280 IPOIB_GID_ARG(tx->neigh->dgid)); 1280 tx->neigh->dgid.raw);
1281 tx->neigh = NULL; 1281 tx->neigh = NULL;
1282 } 1282 }
1283} 1283}
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 28eb6f03c588..a1925810be3c 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -446,11 +446,11 @@ poll_more:
446 if (dev->features & NETIF_F_LRO) 446 if (dev->features & NETIF_F_LRO)
447 lro_flush_all(&priv->lro.lro_mgr); 447 lro_flush_all(&priv->lro.lro_mgr);
448 448
449 netif_rx_complete(dev, napi); 449 netif_rx_complete(napi);
450 if (unlikely(ib_req_notify_cq(priv->recv_cq, 450 if (unlikely(ib_req_notify_cq(priv->recv_cq,
451 IB_CQ_NEXT_COMP | 451 IB_CQ_NEXT_COMP |
452 IB_CQ_REPORT_MISSED_EVENTS)) && 452 IB_CQ_REPORT_MISSED_EVENTS)) &&
453 netif_rx_reschedule(dev, napi)) 453 netif_rx_reschedule(napi))
454 goto poll_more; 454 goto poll_more;
455 } 455 }
456 456
@@ -462,7 +462,7 @@ void ipoib_ib_completion(struct ib_cq *cq, void *dev_ptr)
462 struct net_device *dev = dev_ptr; 462 struct net_device *dev = dev_ptr;
463 struct ipoib_dev_priv *priv = netdev_priv(dev); 463 struct ipoib_dev_priv *priv = netdev_priv(dev);
464 464
465 netif_rx_schedule(dev, &priv->napi); 465 netif_rx_schedule(&priv->napi);
466} 466}
467 467
468static void drain_tx_cq(struct net_device *dev) 468static void drain_tx_cq(struct net_device *dev)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 85257f6b9576..19e06bc38b39 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -360,9 +360,9 @@ void ipoib_mark_paths_invalid(struct net_device *dev)
360 spin_lock_irq(&priv->lock); 360 spin_lock_irq(&priv->lock);
361 361
362 list_for_each_entry_safe(path, tp, &priv->path_list, list) { 362 list_for_each_entry_safe(path, tp, &priv->path_list, list) {
363 ipoib_dbg(priv, "mark path LID 0x%04x GID " IPOIB_GID_FMT " invalid\n", 363 ipoib_dbg(priv, "mark path LID 0x%04x GID %pI6 invalid\n",
364 be16_to_cpu(path->pathrec.dlid), 364 be16_to_cpu(path->pathrec.dlid),
365 IPOIB_GID_ARG(path->pathrec.dgid)); 365 path->pathrec.dgid.raw);
366 path->valid = 0; 366 path->valid = 0;
367 } 367 }
368 368
@@ -414,11 +414,11 @@ static void path_rec_completion(int status,
414 unsigned long flags; 414 unsigned long flags;
415 415
416 if (!status) 416 if (!status)
417 ipoib_dbg(priv, "PathRec LID 0x%04x for GID " IPOIB_GID_FMT "\n", 417 ipoib_dbg(priv, "PathRec LID 0x%04x for GID %pI6\n",
418 be16_to_cpu(pathrec->dlid), IPOIB_GID_ARG(pathrec->dgid)); 418 be16_to_cpu(pathrec->dlid), pathrec->dgid.raw);
419 else 419 else
420 ipoib_dbg(priv, "PathRec status %d for GID " IPOIB_GID_FMT "\n", 420 ipoib_dbg(priv, "PathRec status %d for GID %pI6\n",
421 status, IPOIB_GID_ARG(path->pathrec.dgid)); 421 status, path->pathrec.dgid.raw);
422 422
423 skb_queue_head_init(&skqueue); 423 skb_queue_head_init(&skqueue);
424 424
@@ -528,8 +528,8 @@ static int path_rec_start(struct net_device *dev,
528{ 528{
529 struct ipoib_dev_priv *priv = netdev_priv(dev); 529 struct ipoib_dev_priv *priv = netdev_priv(dev);
530 530
531 ipoib_dbg(priv, "Start path record lookup for " IPOIB_GID_FMT "\n", 531 ipoib_dbg(priv, "Start path record lookup for %pI6\n",
532 IPOIB_GID_ARG(path->pathrec.dgid)); 532 path->pathrec.dgid.raw);
533 533
534 init_completion(&path->done); 534 init_completion(&path->done);
535 535
@@ -766,12 +766,11 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
766 766
767 if ((be16_to_cpup((__be16 *) skb->data) != ETH_P_ARP) && 767 if ((be16_to_cpup((__be16 *) skb->data) != ETH_P_ARP) &&
768 (be16_to_cpup((__be16 *) skb->data) != ETH_P_RARP)) { 768 (be16_to_cpup((__be16 *) skb->data) != ETH_P_RARP)) {
769 ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x " 769 ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x %pI6\n",
770 IPOIB_GID_FMT "\n",
771 skb->dst ? "neigh" : "dst", 770 skb->dst ? "neigh" : "dst",
772 be16_to_cpup((__be16 *) skb->data), 771 be16_to_cpup((__be16 *) skb->data),
773 IPOIB_QPN(phdr->hwaddr), 772 IPOIB_QPN(phdr->hwaddr),
774 IPOIB_GID_RAW_ARG(phdr->hwaddr + 4)); 773 phdr->hwaddr + 4);
775 dev_kfree_skb_any(skb); 774 dev_kfree_skb_any(skb);
776 ++dev->stats.tx_dropped; 775 ++dev->stats.tx_dropped;
777 return NETDEV_TX_OK; 776 return NETDEV_TX_OK;
@@ -847,9 +846,9 @@ static void ipoib_neigh_cleanup(struct neighbour *n)
847 else 846 else
848 return; 847 return;
849 ipoib_dbg(priv, 848 ipoib_dbg(priv,
850 "neigh_cleanup for %06x " IPOIB_GID_FMT "\n", 849 "neigh_cleanup for %06x %pI6\n",
851 IPOIB_QPN(n->ha), 850 IPOIB_QPN(n->ha),
852 IPOIB_GID_RAW_ARG(n->ha + 4)); 851 n->ha + 4);
853 852
854 spin_lock_irqsave(&priv->lock, flags); 853 spin_lock_irqsave(&priv->lock, flags);
855 854
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index d9d1223c3fd5..a2eb3b9789eb 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -71,9 +71,8 @@ static void ipoib_mcast_free(struct ipoib_mcast *mcast)
71 struct ipoib_neigh *neigh, *tmp; 71 struct ipoib_neigh *neigh, *tmp;
72 int tx_dropped = 0; 72 int tx_dropped = 0;
73 73
74 ipoib_dbg_mcast(netdev_priv(dev), 74 ipoib_dbg_mcast(netdev_priv(dev), "deleting multicast group %pI6\n",
75 "deleting multicast group " IPOIB_GID_FMT "\n", 75 mcast->mcmember.mgid.raw);
76 IPOIB_GID_ARG(mcast->mcmember.mgid));
77 76
78 spin_lock_irq(&priv->lock); 77 spin_lock_irq(&priv->lock);
79 78
@@ -205,9 +204,8 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
205 204
206 if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { 205 if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
207 if (test_and_set_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { 206 if (test_and_set_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) {
208 ipoib_warn(priv, "multicast group " IPOIB_GID_FMT 207 ipoib_warn(priv, "multicast group %pI6 already attached\n",
209 " already attached\n", 208 mcast->mcmember.mgid.raw);
210 IPOIB_GID_ARG(mcast->mcmember.mgid));
211 209
212 return 0; 210 return 0;
213 } 211 }
@@ -215,9 +213,8 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
215 ret = ipoib_mcast_attach(dev, be16_to_cpu(mcast->mcmember.mlid), 213 ret = ipoib_mcast_attach(dev, be16_to_cpu(mcast->mcmember.mlid),
216 &mcast->mcmember.mgid, set_qkey); 214 &mcast->mcmember.mgid, set_qkey);
217 if (ret < 0) { 215 if (ret < 0) {
218 ipoib_warn(priv, "couldn't attach QP to multicast group " 216 ipoib_warn(priv, "couldn't attach QP to multicast group %pI6\n",
219 IPOIB_GID_FMT "\n", 217 mcast->mcmember.mgid.raw);
220 IPOIB_GID_ARG(mcast->mcmember.mgid));
221 218
222 clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags); 219 clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags);
223 return ret; 220 return ret;
@@ -248,9 +245,8 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
248 mcast->ah = ah; 245 mcast->ah = ah;
249 spin_unlock_irq(&priv->lock); 246 spin_unlock_irq(&priv->lock);
250 247
251 ipoib_dbg_mcast(priv, "MGID " IPOIB_GID_FMT 248 ipoib_dbg_mcast(priv, "MGID %pI6 AV %p, LID 0x%04x, SL %d\n",
252 " AV %p, LID 0x%04x, SL %d\n", 249 mcast->mcmember.mgid.raw,
253 IPOIB_GID_ARG(mcast->mcmember.mgid),
254 mcast->ah->ah, 250 mcast->ah->ah,
255 be16_to_cpu(mcast->mcmember.mlid), 251 be16_to_cpu(mcast->mcmember.mlid),
256 mcast->mcmember.sl); 252 mcast->mcmember.sl);
@@ -295,9 +291,8 @@ ipoib_mcast_sendonly_join_complete(int status,
295 291
296 if (status) { 292 if (status) {
297 if (mcast->logcount++ < 20) 293 if (mcast->logcount++ < 20)
298 ipoib_dbg_mcast(netdev_priv(dev), "multicast join failed for " 294 ipoib_dbg_mcast(netdev_priv(dev), "multicast join failed for %pI6, status %d\n",
299 IPOIB_GID_FMT ", status %d\n", 295 mcast->mcmember.mgid.raw, status);
300 IPOIB_GID_ARG(mcast->mcmember.mgid), status);
301 296
302 /* Flush out any queued packets */ 297 /* Flush out any queued packets */
303 netif_tx_lock_bh(dev); 298 netif_tx_lock_bh(dev);
@@ -356,9 +351,8 @@ static int ipoib_mcast_sendonly_join(struct ipoib_mcast *mcast)
356 ipoib_warn(priv, "ib_sa_join_multicast failed (ret = %d)\n", 351 ipoib_warn(priv, "ib_sa_join_multicast failed (ret = %d)\n",
357 ret); 352 ret);
358 } else { 353 } else {
359 ipoib_dbg_mcast(priv, "no multicast record for " IPOIB_GID_FMT 354 ipoib_dbg_mcast(priv, "no multicast record for %pI6, starting join\n",
360 ", starting join\n", 355 mcast->mcmember.mgid.raw);
361 IPOIB_GID_ARG(mcast->mcmember.mgid));
362 } 356 }
363 357
364 return ret; 358 return ret;
@@ -386,9 +380,8 @@ static int ipoib_mcast_join_complete(int status,
386 struct net_device *dev = mcast->dev; 380 struct net_device *dev = mcast->dev;
387 struct ipoib_dev_priv *priv = netdev_priv(dev); 381 struct ipoib_dev_priv *priv = netdev_priv(dev);
388 382
389 ipoib_dbg_mcast(priv, "join completion for " IPOIB_GID_FMT 383 ipoib_dbg_mcast(priv, "join completion for %pI6 (status %d)\n",
390 " (status %d)\n", 384 mcast->mcmember.mgid.raw, status);
391 IPOIB_GID_ARG(mcast->mcmember.mgid), status);
392 385
393 /* We trap for port events ourselves. */ 386 /* We trap for port events ourselves. */
394 if (status == -ENETRESET) 387 if (status == -ENETRESET)
@@ -417,15 +410,11 @@ static int ipoib_mcast_join_complete(int status,
417 410
418 if (mcast->logcount++ < 20) { 411 if (mcast->logcount++ < 20) {
419 if (status == -ETIMEDOUT) { 412 if (status == -ETIMEDOUT) {
420 ipoib_dbg_mcast(priv, "multicast join failed for " IPOIB_GID_FMT 413 ipoib_dbg_mcast(priv, "multicast join failed for %pI6, status %d\n",
421 ", status %d\n", 414 mcast->mcmember.mgid.raw, status);
422 IPOIB_GID_ARG(mcast->mcmember.mgid),
423 status);
424 } else { 415 } else {
425 ipoib_warn(priv, "multicast join failed for " 416 ipoib_warn(priv, "multicast join failed for %pI6, status %d\n",
426 IPOIB_GID_FMT ", status %d\n", 417 mcast->mcmember.mgid.raw, status);
427 IPOIB_GID_ARG(mcast->mcmember.mgid),
428 status);
429 } 418 }
430 } 419 }
431 420
@@ -457,8 +446,7 @@ static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast,
457 ib_sa_comp_mask comp_mask; 446 ib_sa_comp_mask comp_mask;
458 int ret = 0; 447 int ret = 0;
459 448
460 ipoib_dbg_mcast(priv, "joining MGID " IPOIB_GID_FMT "\n", 449 ipoib_dbg_mcast(priv, "joining MGID %pI6\n", mcast->mcmember.mgid.raw);
461 IPOIB_GID_ARG(mcast->mcmember.mgid));
462 450
463 rec.mgid = mcast->mcmember.mgid; 451 rec.mgid = mcast->mcmember.mgid;
464 rec.port_gid = priv->local_gid; 452 rec.port_gid = priv->local_gid;
@@ -643,8 +631,8 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
643 ib_sa_free_multicast(mcast->mc); 631 ib_sa_free_multicast(mcast->mc);
644 632
645 if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { 633 if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) {
646 ipoib_dbg_mcast(priv, "leaving MGID " IPOIB_GID_FMT "\n", 634 ipoib_dbg_mcast(priv, "leaving MGID %pI6\n",
647 IPOIB_GID_ARG(mcast->mcmember.mgid)); 635 mcast->mcmember.mgid.raw);
648 636
649 /* Remove ourselves from the multicast group */ 637 /* Remove ourselves from the multicast group */
650 ret = ib_detach_mcast(priv->qp, &mcast->mcmember.mgid, 638 ret = ib_detach_mcast(priv->qp, &mcast->mcmember.mgid,
@@ -675,8 +663,8 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb)
675 mcast = __ipoib_mcast_find(dev, mgid); 663 mcast = __ipoib_mcast_find(dev, mgid);
676 if (!mcast) { 664 if (!mcast) {
677 /* Let's create a new send only group now */ 665 /* Let's create a new send only group now */
678 ipoib_dbg_mcast(priv, "setting up send only multicast group for " 666 ipoib_dbg_mcast(priv, "setting up send only multicast group for %pI6\n",
679 IPOIB_GID_FMT "\n", IPOIB_GID_RAW_ARG(mgid)); 667 mgid);
680 668
681 mcast = ipoib_mcast_alloc(dev, 0); 669 mcast = ipoib_mcast_alloc(dev, 0);
682 if (!mcast) { 670 if (!mcast) {
@@ -809,14 +797,14 @@ void ipoib_mcast_restart_task(struct work_struct *work)
809 /* ignore group which is directly joined by userspace */ 797 /* ignore group which is directly joined by userspace */
810 if (test_bit(IPOIB_FLAG_UMCAST, &priv->flags) && 798 if (test_bit(IPOIB_FLAG_UMCAST, &priv->flags) &&
811 !ib_sa_get_mcmember_rec(priv->ca, priv->port, &mgid, &rec)) { 799 !ib_sa_get_mcmember_rec(priv->ca, priv->port, &mgid, &rec)) {
812 ipoib_dbg_mcast(priv, "ignoring multicast entry for mgid " 800 ipoib_dbg_mcast(priv, "ignoring multicast entry for mgid %pI6\n",
813 IPOIB_GID_FMT "\n", IPOIB_GID_ARG(mgid)); 801 mgid.raw);
814 continue; 802 continue;
815 } 803 }
816 804
817 /* Not found or send-only group, let's add a new entry */ 805 /* Not found or send-only group, let's add a new entry */
818 ipoib_dbg_mcast(priv, "adding multicast entry for mgid " 806 ipoib_dbg_mcast(priv, "adding multicast entry for mgid %pI6\n",
819 IPOIB_GID_FMT "\n", IPOIB_GID_ARG(mgid)); 807 mgid.raw);
820 808
821 nmcast = ipoib_mcast_alloc(dev, 0); 809 nmcast = ipoib_mcast_alloc(dev, 0);
822 if (!nmcast) { 810 if (!nmcast) {
@@ -849,8 +837,8 @@ void ipoib_mcast_restart_task(struct work_struct *work)
849 list_for_each_entry_safe(mcast, tmcast, &priv->multicast_list, list) { 837 list_for_each_entry_safe(mcast, tmcast, &priv->multicast_list, list) {
850 if (!test_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags) && 838 if (!test_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags) &&
851 !test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { 839 !test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
852 ipoib_dbg_mcast(priv, "deleting multicast group " IPOIB_GID_FMT "\n", 840 ipoib_dbg_mcast(priv, "deleting multicast group %pI6\n",
853 IPOIB_GID_ARG(mcast->mcmember.mgid)); 841 mcast->mcmember.mgid.raw);
854 842
855 rb_erase(&mcast->rb_node, &priv->multicast_tree); 843 rb_erase(&mcast->rb_node, &priv->multicast_tree);
856 844
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 6dc6b174cdd4..319b188145be 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -516,14 +516,14 @@ int iser_connect(struct iser_conn *ib_conn,
516 struct sockaddr *src, *dst; 516 struct sockaddr *src, *dst;
517 int err = 0; 517 int err = 0;
518 518
519 sprintf(ib_conn->name,"%d.%d.%d.%d:%d", 519 sprintf(ib_conn->name, "%pI4:%d",
520 NIPQUAD(dst_addr->sin_addr.s_addr), dst_addr->sin_port); 520 &dst_addr->sin_addr.s_addr, dst_addr->sin_port);
521 521
522 /* the device is known only --after-- address resolution */ 522 /* the device is known only --after-- address resolution */
523 ib_conn->device = NULL; 523 ib_conn->device = NULL;
524 524
525 iser_err("connecting to: %d.%d.%d.%d, port 0x%x\n", 525 iser_err("connecting to: %pI4, port 0x%x\n",
526 NIPQUAD(dst_addr->sin_addr), dst_addr->sin_port); 526 &dst_addr->sin_addr, dst_addr->sin_port);
527 527
528 ib_conn->state = ISER_CONN_PENDING; 528 ib_conn->state = ISER_CONN_PENDING;
529 529
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 5b8b533f2908..7c13db885bf6 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1514,15 +1514,7 @@ static ssize_t show_dgid(struct device *dev, struct device_attribute *attr,
1514 target->state == SRP_TARGET_REMOVED) 1514 target->state == SRP_TARGET_REMOVED)
1515 return -ENODEV; 1515 return -ENODEV;
1516 1516
1517 return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 1517 return sprintf(buf, "%pI6\n", target->path.dgid.raw);
1518 be16_to_cpu(((__be16 *) target->path.dgid.raw)[0]),
1519 be16_to_cpu(((__be16 *) target->path.dgid.raw)[1]),
1520 be16_to_cpu(((__be16 *) target->path.dgid.raw)[2]),
1521 be16_to_cpu(((__be16 *) target->path.dgid.raw)[3]),
1522 be16_to_cpu(((__be16 *) target->path.dgid.raw)[4]),
1523 be16_to_cpu(((__be16 *) target->path.dgid.raw)[5]),
1524 be16_to_cpu(((__be16 *) target->path.dgid.raw)[6]),
1525 be16_to_cpu(((__be16 *) target->path.dgid.raw)[7]));
1526} 1518}
1527 1519
1528static ssize_t show_orig_dgid(struct device *dev, 1520static ssize_t show_orig_dgid(struct device *dev,
@@ -1534,15 +1526,7 @@ static ssize_t show_orig_dgid(struct device *dev,
1534 target->state == SRP_TARGET_REMOVED) 1526 target->state == SRP_TARGET_REMOVED)
1535 return -ENODEV; 1527 return -ENODEV;
1536 1528
1537 return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 1529 return sprintf(buf, "%pI6\n", target->orig_dgid);
1538 be16_to_cpu(target->orig_dgid[0]),
1539 be16_to_cpu(target->orig_dgid[1]),
1540 be16_to_cpu(target->orig_dgid[2]),
1541 be16_to_cpu(target->orig_dgid[3]),
1542 be16_to_cpu(target->orig_dgid[4]),
1543 be16_to_cpu(target->orig_dgid[5]),
1544 be16_to_cpu(target->orig_dgid[6]),
1545 be16_to_cpu(target->orig_dgid[7]));
1546} 1530}
1547 1531
1548static ssize_t show_zero_req_lim(struct device *dev, 1532static ssize_t show_zero_req_lim(struct device *dev,
@@ -1883,19 +1867,12 @@ static ssize_t srp_create_target(struct device *dev,
1883 1867
1884 shost_printk(KERN_DEBUG, target->scsi_host, PFX 1868 shost_printk(KERN_DEBUG, target->scsi_host, PFX
1885 "new target: id_ext %016llx ioc_guid %016llx pkey %04x " 1869 "new target: id_ext %016llx ioc_guid %016llx pkey %04x "
1886 "service_id %016llx dgid %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 1870 "service_id %016llx dgid %pI6\n",
1887 (unsigned long long) be64_to_cpu(target->id_ext), 1871 (unsigned long long) be64_to_cpu(target->id_ext),
1888 (unsigned long long) be64_to_cpu(target->ioc_guid), 1872 (unsigned long long) be64_to_cpu(target->ioc_guid),
1889 be16_to_cpu(target->path.pkey), 1873 be16_to_cpu(target->path.pkey),
1890 (unsigned long long) be64_to_cpu(target->service_id), 1874 (unsigned long long) be64_to_cpu(target->service_id),
1891 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[0]), 1875 target->path.dgid.raw);
1892 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[2]),
1893 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[4]),
1894 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[6]),
1895 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[8]),
1896 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[10]),
1897 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[12]),
1898 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[14]));
1899 1876
1900 ret = srp_create_target_ib(target); 1877 ret = srp_create_target_ib(target);
1901 if (ret) 1878 if (ret)