[ofa-general] [PATCH] fix for an IPoIB compile error

Shirley Ma mashirle at us.ibm.com
Wed Jan 23 05:11:10 PST 2008


Hello,

	Here is a trivial patch to fix below IPoIB compile error when CM is not
configured. The patch is against OFED-1.3 kernel git tree.

drivers/infiniband/ulp/ipoib/ipoib_main.c: In function
‘ipoib_change_mtu’:
drivers/infiniband/ulp/ipoib/ipoib_main.c:186: error: ‘struct
ipoib_dev_priv’ has no member named ‘cm’


thanks
Shirley

Signed-off-by: Shirley Ma <xma at us.ibm.com>

diff -urpN ipoib-patch1/ipoib_main.c ipoib/ipoib_main.c
--- ipoib-patch1/ipoib_main.c	2008-01-23 17:51:24.000000000 -0500
+++ ipoib/ipoib_main.c	2008-01-23 17:53:41.000000000 -0500
@@ -181,6 +181,7 @@ static int ipoib_change_mtu(struct net_d
 {
 	struct ipoib_dev_priv *priv = netdev_priv(dev);
 
+#ifdef CONFIG_INFINIBAND_IPOIB_CM
 	/* dev->mtu > 2K ==> connected mode */
 	if (ipoib_cm_admin_enabled(dev)) {
 		if (new_mtu > priv->cm.max_cm_mtu)
@@ -192,6 +193,7 @@ static int ipoib_change_mtu(struct net_d
 		dev->mtu = new_mtu;
 		return 0;
 	}
+#endif
 	if (new_mtu > ipoib_ud_mtu(priv->max_ib_mtu))
 		return -EINVAL;
 





More information about the general mailing list