diff options
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/Makefile | 2 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib.h | 12 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_fs.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 5 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 33 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 1 |
8 files changed, 40 insertions, 26 deletions
diff --git a/drivers/infiniband/ulp/ipoib/Makefile b/drivers/infiniband/ulp/ipoib/Makefile index 394bc08abc6f..8935e74ae3f8 100644 --- a/drivers/infiniband/ulp/ipoib/Makefile +++ b/drivers/infiniband/ulp/ipoib/Makefile | |||
@@ -1,5 +1,3 @@ | |||
1 | EXTRA_CFLAGS += -Idrivers/infiniband/include | ||
2 | |||
3 | obj-$(CONFIG_INFINIBAND_IPOIB) += ib_ipoib.o | 1 | obj-$(CONFIG_INFINIBAND_IPOIB) += ib_ipoib.o |
4 | 2 | ||
5 | ib_ipoib-y := ipoib_main.o \ | 3 | ib_ipoib-y := ipoib_main.o \ |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index 04c98f54e9c4..bea960b8191f 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h | |||
@@ -1,5 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. | 2 | * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. |
3 | * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. | ||
4 | * Copyright (c) 2004 Voltaire, Inc. All rights reserved. | ||
3 | * | 5 | * |
4 | * This software is available to you under a choice of one of two | 6 | * This software is available to you under a choice of one of two |
5 | * licenses. You may choose to be licensed under the terms of the GNU | 7 | * licenses. You may choose to be licensed under the terms of the GNU |
@@ -49,9 +51,9 @@ | |||
49 | #include <asm/atomic.h> | 51 | #include <asm/atomic.h> |
50 | #include <asm/semaphore.h> | 52 | #include <asm/semaphore.h> |
51 | 53 | ||
52 | #include <ib_verbs.h> | 54 | #include <rdma/ib_verbs.h> |
53 | #include <ib_pack.h> | 55 | #include <rdma/ib_pack.h> |
54 | #include <ib_sa.h> | 56 | #include <rdma/ib_sa.h> |
55 | 57 | ||
56 | /* constants */ | 58 | /* constants */ |
57 | 59 | ||
@@ -88,8 +90,8 @@ enum { | |||
88 | /* structs */ | 90 | /* structs */ |
89 | 91 | ||
90 | struct ipoib_header { | 92 | struct ipoib_header { |
91 | u16 proto; | 93 | __be16 proto; |
92 | u16 reserved; | 94 | u16 reserved; |
93 | }; | 95 | }; |
94 | 96 | ||
95 | struct ipoib_pseudoheader { | 97 | struct ipoib_pseudoheader { |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_fs.c b/drivers/infiniband/ulp/ipoib/ipoib_fs.c index a84e5fe0f193..38b150f775e7 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_fs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_fs.c | |||
@@ -97,7 +97,7 @@ static int ipoib_mcg_seq_show(struct seq_file *file, void *iter_ptr) | |||
97 | 97 | ||
98 | for (n = 0, i = 0; i < sizeof mgid / 2; ++i) { | 98 | for (n = 0, i = 0; i < sizeof mgid / 2; ++i) { |
99 | n += sprintf(gid_buf + n, "%x", | 99 | n += sprintf(gid_buf + n, "%x", |
100 | be16_to_cpu(((u16 *)mgid.raw)[i])); | 100 | be16_to_cpu(((__be16 *) mgid.raw)[i])); |
101 | if (i < sizeof mgid / 2 - 1) | 101 | if (i < sizeof mgid / 2 - 1) |
102 | gid_buf[n++] = ':'; | 102 | gid_buf[n++] = ':'; |
103 | } | 103 | } |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index eee82363167d..ef0e3894863c 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -1,5 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. | 2 | * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. |
3 | * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. | ||
4 | * Copyright (c) 2005 Mellanox Technologies. All rights reserved. | ||
5 | * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved. | ||
3 | * | 6 | * |
4 | * This software is available to you under a choice of one of two | 7 | * This software is available to you under a choice of one of two |
5 | * licenses. You may choose to be licensed under the terms of the GNU | 8 | * licenses. You may choose to be licensed under the terms of the GNU |
@@ -35,7 +38,7 @@ | |||
35 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
36 | #include <linux/dma-mapping.h> | 39 | #include <linux/dma-mapping.h> |
37 | 40 | ||
38 | #include <ib_cache.h> | 41 | #include <rdma/ib_cache.h> |
39 | 42 | ||
40 | #include "ipoib.h" | 43 | #include "ipoib.h" |
41 | 44 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index fa00816a3cf7..0e8ac138e355 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -1,5 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2004 Topspin Communications. All rights reserved. | 2 | * Copyright (c) 2004 Topspin Communications. All rights reserved. |
3 | * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. | ||
4 | * Copyright (c) 2004 Voltaire, Inc. All rights reserved. | ||
3 | * | 5 | * |
4 | * This software is available to you under a choice of one of two | 6 | * This software is available to you under a choice of one of two |
5 | * licenses. You may choose to be licensed under the terms of the GNU | 7 | * licenses. You may choose to be licensed under the terms of the GNU |
@@ -34,7 +36,6 @@ | |||
34 | 36 | ||
35 | #include "ipoib.h" | 37 | #include "ipoib.h" |
36 | 38 | ||
37 | #include <linux/version.h> | ||
38 | #include <linux/module.h> | 39 | #include <linux/module.h> |
39 | 40 | ||
40 | #include <linux/init.h> | 41 | #include <linux/init.h> |
@@ -607,8 +608,8 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
607 | ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x " | 608 | ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x " |
608 | IPOIB_GID_FMT "\n", | 609 | IPOIB_GID_FMT "\n", |
609 | skb->dst ? "neigh" : "dst", | 610 | skb->dst ? "neigh" : "dst", |
610 | be16_to_cpup((u16 *) skb->data), | 611 | be16_to_cpup((__be16 *) skb->data), |
611 | be32_to_cpup((u32 *) phdr->hwaddr), | 612 | be32_to_cpup((__be32 *) phdr->hwaddr), |
612 | IPOIB_GID_ARG(*(union ib_gid *) (phdr->hwaddr + 4))); | 613 | IPOIB_GID_ARG(*(union ib_gid *) (phdr->hwaddr + 4))); |
613 | dev_kfree_skb_any(skb); | 614 | dev_kfree_skb_any(skb); |
614 | ++priv->stats.tx_dropped; | 615 | ++priv->stats.tx_dropped; |
@@ -671,7 +672,7 @@ static void ipoib_set_mcast_list(struct net_device *dev) | |||
671 | { | 672 | { |
672 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 673 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
673 | 674 | ||
674 | schedule_work(&priv->restart_task); | 675 | queue_work(ipoib_workqueue, &priv->restart_task); |
675 | } | 676 | } |
676 | 677 | ||
677 | static void ipoib_neigh_destructor(struct neighbour *n) | 678 | static void ipoib_neigh_destructor(struct neighbour *n) |
@@ -780,15 +781,11 @@ void ipoib_dev_cleanup(struct net_device *dev) | |||
780 | 781 | ||
781 | ipoib_ib_dev_cleanup(dev); | 782 | ipoib_ib_dev_cleanup(dev); |
782 | 783 | ||
783 | if (priv->rx_ring) { | 784 | kfree(priv->rx_ring); |
784 | kfree(priv->rx_ring); | 785 | kfree(priv->tx_ring); |
785 | priv->rx_ring = NULL; | ||
786 | } | ||
787 | 786 | ||
788 | if (priv->tx_ring) { | 787 | priv->rx_ring = NULL; |
789 | kfree(priv->tx_ring); | 788 | priv->tx_ring = NULL; |
790 | priv->tx_ring = NULL; | ||
791 | } | ||
792 | } | 789 | } |
793 | 790 | ||
794 | static void ipoib_setup(struct net_device *dev) | 791 | static void ipoib_setup(struct net_device *dev) |
@@ -886,6 +883,12 @@ static ssize_t create_child(struct class_device *cdev, | |||
886 | if (pkey < 0 || pkey > 0xffff) | 883 | if (pkey < 0 || pkey > 0xffff) |
887 | return -EINVAL; | 884 | return -EINVAL; |
888 | 885 | ||
886 | /* | ||
887 | * Set the full membership bit, so that we join the right | ||
888 | * broadcast group, etc. | ||
889 | */ | ||
890 | pkey |= 0x8000; | ||
891 | |||
889 | ret = ipoib_vlan_add(container_of(cdev, struct net_device, class_dev), | 892 | ret = ipoib_vlan_add(container_of(cdev, struct net_device, class_dev), |
890 | pkey); | 893 | pkey); |
891 | 894 | ||
@@ -938,6 +941,12 @@ static struct net_device *ipoib_add_port(const char *format, | |||
938 | goto alloc_mem_failed; | 941 | goto alloc_mem_failed; |
939 | } | 942 | } |
940 | 943 | ||
944 | /* | ||
945 | * Set the full membership bit, so that we join the right | ||
946 | * broadcast group, etc. | ||
947 | */ | ||
948 | priv->pkey |= 0x8000; | ||
949 | |||
941 | priv->dev->broadcast[8] = priv->pkey >> 8; | 950 | priv->dev->broadcast[8] = priv->pkey >> 8; |
942 | priv->dev->broadcast[9] = priv->pkey & 0xff; | 951 | priv->dev->broadcast[9] = priv->pkey & 0xff; |
943 | 952 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 70208c3d21e2..aca7aea18a69 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -1,5 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. | 2 | * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. |
3 | * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. | ||
4 | * Copyright (c) 2004 Voltaire, Inc. All rights reserved. | ||
3 | * | 5 | * |
4 | * This software is available to you under a choice of one of two | 6 | * This software is available to you under a choice of one of two |
5 | * licenses. You may choose to be licensed under the terms of the GNU | 7 | * licenses. You may choose to be licensed under the terms of the GNU |
@@ -357,7 +359,7 @@ static int ipoib_mcast_sendonly_join(struct ipoib_mcast *mcast) | |||
357 | 359 | ||
358 | rec.mgid = mcast->mcmember.mgid; | 360 | rec.mgid = mcast->mcmember.mgid; |
359 | rec.port_gid = priv->local_gid; | 361 | rec.port_gid = priv->local_gid; |
360 | rec.pkey = be16_to_cpu(priv->pkey); | 362 | rec.pkey = cpu_to_be16(priv->pkey); |
361 | 363 | ||
362 | ret = ib_sa_mcmember_rec_set(priv->ca, priv->port, &rec, | 364 | ret = ib_sa_mcmember_rec_set(priv->ca, priv->port, &rec, |
363 | IB_SA_MCMEMBER_REC_MGID | | 365 | IB_SA_MCMEMBER_REC_MGID | |
@@ -457,7 +459,7 @@ static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast, | |||
457 | 459 | ||
458 | rec.mgid = mcast->mcmember.mgid; | 460 | rec.mgid = mcast->mcmember.mgid; |
459 | rec.port_gid = priv->local_gid; | 461 | rec.port_gid = priv->local_gid; |
460 | rec.pkey = be16_to_cpu(priv->pkey); | 462 | rec.pkey = cpu_to_be16(priv->pkey); |
461 | 463 | ||
462 | comp_mask = | 464 | comp_mask = |
463 | IB_SA_MCMEMBER_REC_MGID | | 465 | IB_SA_MCMEMBER_REC_MGID | |
@@ -646,7 +648,7 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast) | |||
646 | 648 | ||
647 | rec.mgid = mcast->mcmember.mgid; | 649 | rec.mgid = mcast->mcmember.mgid; |
648 | rec.port_gid = priv->local_gid; | 650 | rec.port_gid = priv->local_gid; |
649 | rec.pkey = be16_to_cpu(priv->pkey); | 651 | rec.pkey = cpu_to_be16(priv->pkey); |
650 | 652 | ||
651 | /* Remove ourselves from the multicast group */ | 653 | /* Remove ourselves from the multicast group */ |
652 | ret = ipoib_mcast_detach(dev, be16_to_cpu(mcast->mcmember.mlid), | 654 | ret = ipoib_mcast_detach(dev, be16_to_cpu(mcast->mcmember.mlid), |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c index 4933edf062c2..79f59d0563ed 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. | 2 | * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. |
3 | * Copyright (c) 2005 Mellanox Technologies. All rights reserved. | ||
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
5 | * licenses. You may choose to be licensed under the terms of the GNU | 6 | * licenses. You may choose to be licensed under the terms of the GNU |
@@ -32,7 +33,7 @@ | |||
32 | * $Id: ipoib_verbs.c 1349 2004-12-16 21:09:43Z roland $ | 33 | * $Id: ipoib_verbs.c 1349 2004-12-16 21:09:43Z roland $ |
33 | */ | 34 | */ |
34 | 35 | ||
35 | #include <ib_cache.h> | 36 | #include <rdma/ib_cache.h> |
36 | 37 | ||
37 | #include "ipoib.h" | 38 | #include "ipoib.h" |
38 | 39 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c index 94b8ea812fef..332d730e60c2 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * $Id: ipoib_vlan.c 1349 2004-12-16 21:09:43Z roland $ | 32 | * $Id: ipoib_vlan.c 1349 2004-12-16 21:09:43Z roland $ |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/version.h> | ||
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
37 | 36 | ||
38 | #include <linux/init.h> | 37 | #include <linux/init.h> |