--- /dev/null
+From: Vipul Pandya <vipul@chelsio.com>
+Subject: [PATCH] iw_cxgb3/iw_cxgb4: Enable header file inclusion with absolute path
+
+iw_cxgb3/iw_cxgb4 driver includes header files of cxgb3/cxgb4 drivers
+respectively. OFED build environment is not able to find the header files
+if absolute path is not given.
+
+Signed-off-by: Vipul Pandya <vipul@chelsio.com>
+---
+ drivers/infiniband/hw/cxgb3/Makefile | 2 +-
+ drivers/infiniband/hw/cxgb4/Makefile | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/infiniband/hw/cxgb3/Makefile b/drivers/infiniband/hw/cxgb3/Makefile
+index xxxxxxx..xxxxxxx xxxxxx
+--- a/drivers/infiniband/hw/cxgb3/Makefile
++++ b/drivers/infiniband/hw/cxgb3/Makefile
+@@ -1,4 +1,4 @@
+-ccflags-y := -Idrivers/net/ethernet/chelsio/cxgb3
++ccflags-y := -I$(CWD)/drivers/net/ethernet/chelsio/cxgb3
+
+ obj-$(CONFIG_INFINIBAND_CXGB3) += iw_cxgb3.o
+
+diff --git a/drivers/infiniband/hw/cxgb4/Makefile b/drivers/infiniband/hw/cxgb4/Makefile
+index xxxxxxx..xxxxxxx xxxxxx
+--- a/drivers/infiniband/hw/cxgb4/Makefile
++++ b/drivers/infiniband/hw/cxgb4/Makefile
+@@ -1,4 +1,4 @@
+-ccflags-y := -Idrivers/net/ethernet/chelsio/cxgb4
++ccflags-y := -I$(CWD)/drivers/net/ethernet/chelsio/cxgb4
+
+ obj-$(CONFIG_INFINIBAND_CXGB4) += iw_cxgb4.o
+
--- /dev/null
+From: Vladimir Sokolovsky <vlad@mellanox.com>
+Subject: [PATCH] BACKPORT: mlx4_en
+
+Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
+---
+ drivers/net/ethernet/mellanox/mlx4/cmd.c | 6 ++++++
+ drivers/net/ethernet/mellanox/mlx4/en_cq.c | 4 ++++
+ drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 ++++
+ drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 ++
+ 4 files changed, 16 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
+index xxxxxxx..xxxxxxx xxxxxx
+--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
++++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
+@@ -2306,6 +2306,7 @@ int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting)
+ }
+ EXPORT_SYMBOL_GPL(mlx4_set_vf_spoofchk);
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) || defined(CONFIG_COMPAT_NDO_VF_MAC_VLAN)
+ int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_info *ivf)
+ {
+ struct mlx4_priv *priv = mlx4_priv(dev);
+@@ -2333,12 +2334,17 @@ int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_in
+ ivf->vlan = s_info->default_vlan;
+ ivf->qos = s_info->default_qos;
+ ivf->tx_rate = s_info->tx_rate;
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+ ivf->spoofchk = s_info->spoofchk;
++#endif
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+ ivf->linkstate = s_info->link_state;
++#endif
+
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(mlx4_get_vf_config);
++#endif
+
+ int mlx4_set_vf_link_state(struct mlx4_dev *dev, int port, int vf, int link_state)
+ {
+diff --git a/drivers/net/ethernet/mellanox/mlx4/en_cq.c b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
+index xxxxxxx..xxxxxxx xxxxxx
+--- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c
++++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
+@@ -139,7 +139,9 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
+
+ if (!cq->is_tx) {
+ netif_napi_add(cq->dev, &cq->napi, mlx4_en_poll_rx_cq, 64);
++#ifdef CONFIG_NET_RX_BUSY_POLL
+ napi_hash_add(&cq->napi);
++#endif
+ napi_enable(&cq->napi);
+ }
+
+@@ -163,7 +165,9 @@ void mlx4_en_deactivate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq)
+ {
+ if (!cq->is_tx) {
+ napi_disable(&cq->napi);
++#ifdef CONFIG_NET_RX_BUSY_POLL
+ napi_hash_del(&cq->napi);
++#endif
+ synchronize_rcu();
+ netif_napi_del(&cq->napi);
+ }
+diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+index xxxxxxx..xxxxxxx xxxxxx
+--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
++++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+@@ -2111,6 +2111,7 @@ static int mlx4_en_get_vf_config(struct net_device *dev, int vf, struct ifla_vf_
+ return mlx4_get_vf_config(mdev->dev, en_priv->port, vf, ivf);
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+ static int mlx4_en_set_vf_link_state(struct net_device *dev, int vf, int link_state)
+ {
+ struct mlx4_en_priv *en_priv = netdev_priv(dev);
+@@ -2118,6 +2119,7 @@ static int mlx4_en_set_vf_link_state(struct net_device *dev, int vf, int link_st
+
+ return mlx4_set_vf_link_state(mdev->dev, en_priv->port, vf, link_state);
+ }
++#endif
+ static const struct net_device_ops mlx4_netdev_ops = {
+ .ndo_open = mlx4_en_open,
+ .ndo_stop = mlx4_en_close,
+@@ -2161,7 +2163,9 @@ static const struct net_device_ops mlx4_netdev_ops_master = {
+ .ndo_set_vf_mac = mlx4_en_set_vf_mac,
+ .ndo_set_vf_vlan = mlx4_en_set_vf_vlan,
+ .ndo_set_vf_spoofchk = mlx4_en_set_vf_spoofchk,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+ .ndo_set_vf_link_state = mlx4_en_set_vf_link_state,
++#endif
+ .ndo_get_vf_config = mlx4_en_get_vf_config,
+ #ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = mlx4_en_netpoll,
+diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+index xxxxxxx..xxxxxxx xxxxxx
+--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
++++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+@@ -767,7 +767,9 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
+ timestamp);
+ }
+
++#ifdef CONFIG_NET_RX_BUSY_POLL
+ skb_mark_napi_id(skb, &cq->napi);
++#endif
+
+ /* Push it up the stack */
+ netif_receive_skb(skb);
--- /dev/null
+From: Vladimir Sokolovsky <vlad@mellanox.com>
+Subject: [PATCH] BACKPORT: mlx4_ib
+
+Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
+---
+ drivers/infiniband/hw/mlx4/cm.c | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c
+index xxxxxxx..xxxxxxx xxxxxx
+--- a/drivers/infiniband/hw/mlx4/cm.c
++++ b/drivers/infiniband/hw/mlx4/cm.c
+@@ -204,6 +204,9 @@ static struct id_map_entry *
+ id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id)
+ {
+ int ret;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
++ static int next_id;
++#endif
+ struct id_map_entry *ent;
+ struct mlx4_ib_sriov *sriov = &to_mdev(ibdev)->sriov;
+
+@@ -222,8 +225,15 @@ id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id)
+ idr_preload(GFP_KERNEL);
+ spin_lock(&to_mdev(ibdev)->sriov.id_map_lock);
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
+ ret = idr_alloc_cyclic(&sriov->pv_id_table, ent, 0, 0, GFP_NOWAIT);
++#else
++ ret = idr_alloc(&sriov->pv_id_table, ent, next_id, 0, GFP_NOWAIT);
++#endif
+ if (ret >= 0) {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
++ next_id = max(ret + 1, 0);
++#endif
+ ent->pv_cm_id = (u32)ret;
+ sl_id_map_add(ibdev, ent);
+ list_add_tail(&ent->list, &sriov->cm_list);