[openib-general] [PATCH applied] sdp updated for 2.6.16

Michael S. Tsirkin mst at mellanox.co.il
Wed Mar 22 02:35:35 PST 2006


I've just commited the following:

---

Update sdp on trunk to 2.6.16

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

 
Index: linux-2.6.16/drivers/infiniband/ulp/sdp/sdp_link.c
===================================================================
--- linux-2.6.16.orig/drivers/infiniband/ulp/sdp/sdp_link.c	2006-03-22 14:46:05.000000000 +0200
+++ linux-2.6.16/drivers/infiniband/ulp/sdp/sdp_link.c	2006-03-22 15:22:07.000000000 +0200
@@ -34,10 +34,39 @@
  */
 
 #include <linux/if_arp.h>
+#include <linux/inetdevice.h>
+#include <net/arp.h>
 
 #include "ipoib.h"
 #include "sdp_main.h"
 
+static struct net_device *xxx_ip_dev_find(u32 addr)
+{
+	struct net_device *dev;
+	struct in_ifaddr **ifap;
+	struct in_ifaddr *ifa;
+	struct in_device *in_dev;
+
+	read_lock(&dev_base_lock);
+	for (dev = dev_base; dev; dev = dev->next)
+		if ((in_dev = in_dev_get(dev))) {
+			for (ifap = &in_dev->ifa_list; (ifa = *ifap);
+			     ifap = &ifa->ifa_next) {
+				if (addr == ifa->ifa_address) {
+					dev_hold(dev);
+					in_dev_put(in_dev);
+					goto found;
+				}
+			}
+			in_dev_put(in_dev);
+		}
+found:
+	read_unlock(&dev_base_lock);
+	return dev;
+}
+
+#define ip_dev_find xxx_ip_dev_find
+
 #define SDP_LINK_F_VALID 0x01 /* valid path info record. */
 #define SDP_LINK_F_ARP   0x02 /* arp request in progress. */
 #define SDP_LINK_F_PATH  0x04 /* arp request in progress. */
Index: linux-2.6.16/drivers/infiniband/ulp/sdp/sdp_inet.c
===================================================================
--- linux-2.6.16.orig/drivers/infiniband/ulp/sdp/sdp_inet.c	2006-03-22 15:17:31.000000000 +0200
+++ linux-2.6.16/drivers/infiniband/ulp/sdp/sdp_inet.c	2006-03-22 15:21:24.000000000 +0200
@@ -36,6 +36,7 @@
 #include <linux/tcp.h>
 #include <asm/ioctls.h>
 #include <linux/workqueue.h>
+#include <linux/inetdevice.h>
 #include "sdp_main.h"
 
 /*
@@ -1029,7 +1030,7 @@ static int sdp_inet_ioctl(struct socket 
 		sdp_conn_unlock(conn);
 		break;
 	default:
-		result = dev_ioctl(cmd, (void __user *)arg);
+		result = -ENOIOCTLCMD;
 		break;
 	}
 

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list