[ewg] Trivial patch to fix compile error for OFED 1.3

Pradeep Satyanarayana pradeeps at linux.vnet.ibm.com
Tue Jan 29 08:23:40 PST 2008


This is a trivial fix to fix a compile error when Connected Mode is
not defined. This patch is upstream:
http://lkml.org/lkml/2008/1/16/287

Please include this in OFED 1.3

Signed-off-by: Pradeep Satyanarayana <pradeeps at linux.vnet.ibm.com>
---

--- a/drivers/infiniband/ulp/ipoib/ipoib.h	2008-01-23 16:29:06.000000000 -0500
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h	2008-01-29 11:03:32.000000000 -0500
@@ -493,6 +493,12 @@ static inline void ipoib_cm_set(struct i
 	neigh->cm = tx;
 }
 
+static inline unsigned int ipoib_cm_max_mtu(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	return priv->cm.max_cm_mtu;
+}
+
 void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_tx *tx);
 int ipoib_cm_dev_open(struct net_device *dev);
 void ipoib_cm_dev_stop(struct net_device *dev);
@@ -535,6 +541,11 @@ static inline void ipoib_cm_set(struct i
 {
 }
 
+static inline unsigned int ipoib_cm_max_mtu(struct net_device *dev)
+{
+	return 0;
+}
+
 static inline
 void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_tx *tx)
 {
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c	2008-01-23 16:29:06.000000000 -0500
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c	2008-01-29 11:04:00.000000000 -0500
@@ -183,7 +183,7 @@ static int ipoib_change_mtu(struct net_d
 
 	/* dev->mtu > 2K ==> connected mode */
 	if (ipoib_cm_admin_enabled(dev)) {
-		if (new_mtu > priv->cm.max_cm_mtu)
+		if (new_mtu > ipoib_cm_max_mtu(dev))
 			return -EINVAL;
 
 		if (new_mtu > priv->mcast_mtu)




More information about the ewg mailing list