svn commit: r216906 - in projects/ofed/base/sys/ofed:
drivers/infiniband/core drivers/infiniband/debug
drivers/infiniband/hw/cxgb3 drivers/infiniband/hw/ehca
drivers/infiniband/hw/mlx4 drivers/infi...
Jeff Roberson
jeff at FreeBSD.org
Mon Jan 3 05:14:40 UTC 2011
Author: jeff
Date: Mon Jan 3 05:14:39 2011
New Revision: 216906
URL: http://svn.freebsd.org/changeset/base/216906
Log:
- Update kernel and drivers to ofed 1.5.3-rc1 commit rev
cf8b6ca317a31ccee24e0058415db36a59242eb6
Modified:
projects/ofed/base/sys/ofed/drivers/infiniband/core/agent.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/cache.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/cm.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/cma.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/mad.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/multicast.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/sa_query.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/sysfs.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/ucma.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/ud_header.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/user_mad.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs.h
projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_main.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/verbs.c
projects/ofed/base/sys/ofed/drivers/infiniband/debug/memtrack.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_hal.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_hal.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_resource.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_resource.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_cm.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_main.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/ah.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/cq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/mad.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/main.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/mr.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/qp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_qp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_cm.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_hw.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_hw.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_nic.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_utils.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_verbs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_verbs.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_7322_regs.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_common.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_cq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_diag.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_driver.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_file_ops.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_iba6120.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_iba7220.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_iba7322.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_init.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_intr.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_keys.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_mad.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_mr.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_pcie.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_qp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_rc.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_sdma.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_trace.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_tx.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_uc.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_ud.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_user_sdma.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_verbs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_verbs.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_dbg.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_proc.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_zcopy.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/scst_debug.h
projects/ofed/base/sys/ofed/drivers/infiniband/util/madeye.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/alloc.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/cmd.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_ethtool.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_netdev.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_port.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_port.h
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_rx.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_tx.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/fw.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/main.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/mcg.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/mlx4.h
projects/ofed/base/sys/ofed/drivers/net/mlx4/mlx4_en.h
projects/ofed/base/sys/ofed/drivers/net/mlx4/pd.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/port.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/qp.c
projects/ofed/base/sys/ofed/include/rdma/ib_addr.h
projects/ofed/base/sys/ofed/include/rdma/ib_sa.h
projects/ofed/base/sys/ofed/include/rdma/ib_user_verbs.h
projects/ofed/base/sys/ofed/include/rdma/ib_verbs.h
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/agent.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/agent.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/agent.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -48,8 +48,6 @@
struct ib_agent_port_private {
struct list_head port_list;
struct ib_mad_agent *agent[2];
- struct ib_device *device;
- u8 port_num;
};
static DEFINE_SPINLOCK(ib_agent_port_list_lock);
@@ -60,10 +58,11 @@ __ib_get_agent_port(struct ib_device *de
{
struct ib_agent_port_private *entry;
- list_for_each_entry(entry, &ib_agent_port_list, port_list)
- if (entry->device == device && entry->port_num == port_num)
+ list_for_each_entry(entry, &ib_agent_port_list, port_list) {
+ if (entry->agent[1]->device == device &&
+ entry->agent[1]->port_num == port_num)
return entry;
-
+ }
return NULL;
}
@@ -156,7 +155,7 @@ int ib_agent_port_open(struct ib_device
goto error1;
}
- if (rdma_port_link_layer(device, port_num) == IB_LINK_LAYER_INFINIBAND) {
+ if (rdma_port_get_link_layer(device, port_num) == IB_LINK_LAYER_INFINIBAND) {
/* Obtain send only MAD agent for SMI QP */
port_priv->agent[0] = ib_register_mad_agent(device, port_num,
IB_QPT_SMI, NULL, 0,
@@ -178,9 +177,6 @@ int ib_agent_port_open(struct ib_device
goto error3;
}
- port_priv->device = device;
- port_priv->port_num = port_num;
-
spin_lock_irqsave(&ib_agent_port_list_lock, flags);
list_add_tail(&port_priv->port_list, &ib_agent_port_list);
spin_unlock_irqrestore(&ib_agent_port_list_lock, flags);
@@ -188,7 +184,7 @@ int ib_agent_port_open(struct ib_device
return 0;
error3:
- if (rdma_port_link_layer(device, port_num) == IB_LINK_LAYER_INFINIBAND)
+ if (port_priv->agent[0])
ib_unregister_mad_agent(port_priv->agent[0]);
error2:
kfree(port_priv);
@@ -212,7 +208,7 @@ int ib_agent_port_close(struct ib_device
spin_unlock_irqrestore(&ib_agent_port_list_lock, flags);
ib_unregister_mad_agent(port_priv->agent[1]);
- if (rdma_port_link_layer(device, port_num) == IB_LINK_LAYER_INFINIBAND)
+ if (port_priv->agent[0])
ib_unregister_mad_agent(port_priv->agent[0]);
kfree(port_priv);
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/cache.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/cache.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/cache.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -302,7 +302,8 @@ static void ib_cache_event(struct ib_eve
event->event == IB_EVENT_LID_CHANGE ||
event->event == IB_EVENT_PKEY_CHANGE ||
event->event == IB_EVENT_SM_CHANGE ||
- event->event == IB_EVENT_CLIENT_REREGISTER) {
+ event->event == IB_EVENT_CLIENT_REREGISTER ||
+ event->event == IB_EVENT_GID_CHANGE) {
work = kmalloc(sizeof *work, GFP_ATOMIC);
if (work) {
INIT_WORK(&work->work, ib_cache_task);
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/cm.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/cm.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/cm.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -362,7 +362,6 @@ static int cm_init_av_by_path(struct ib_
unsigned long flags;
int ret;
u8 p;
- int force_grh;
read_lock_irqsave(&cm.device_lock, flags);
list_for_each_entry(cm_dev, &cm.device_list, list) {
@@ -383,10 +382,8 @@ static int cm_init_av_by_path(struct ib_
return ret;
av->port = port;
- force_grh = rdma_port_link_layer(cm_dev->ib_device, port->port_num) ==
- IB_LINK_LAYER_ETHERNET ? 1 : 0;
ib_init_ah_from_path(cm_dev->ib_device, port->port_num, path,
- &av->ah_attr, force_grh);
+ &av->ah_attr);
av->timeout = path->packet_life_time + 1;
return 0;
}
@@ -2446,10 +2443,12 @@ int ib_send_cm_mra(struct ib_cm_id *cm_i
msg_response = CM_MSG_RESPONSE_REP;
break;
case IB_CM_ESTABLISHED:
- cm_state = cm_id->state;
- lap_state = IB_CM_MRA_LAP_SENT;
- msg_response = CM_MSG_RESPONSE_OTHER;
- break;
+ if (cm_id->lap_state == IB_CM_LAP_RCVD) {
+ cm_state = cm_id->state;
+ lap_state = IB_CM_MRA_LAP_SENT;
+ msg_response = CM_MSG_RESPONSE_OTHER;
+ break;
+ }
default:
ret = -EINVAL;
goto error1;
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/cma.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/cma.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/cma.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -608,7 +608,7 @@ static int cma_ib_init_qp_attr(struct rd
int ret;
u16 pkey;
- if (rdma_port_link_layer(id_priv->id.device, id_priv->id.port_num) ==
+ if (rdma_port_get_link_layer(id_priv->id.device, id_priv->id.port_num) ==
IB_LINK_LAYER_INFINIBAND)
pkey = ib_addr_get_pkey(dev_addr);
else
@@ -793,7 +793,7 @@ static inline int cma_user_data_offset(e
static void cma_cancel_route(struct rdma_id_private *id_priv)
{
- switch (rdma_port_link_layer(id_priv->id.device, id_priv->id.port_num)) {
+ switch (rdma_port_get_link_layer(id_priv->id.device, id_priv->id.port_num)) {
case IB_LINK_LAYER_INFINIBAND:
if (id_priv->query)
ib_sa_cancel_query(id_priv->query_id, id_priv->query);
@@ -874,7 +874,7 @@ static void cma_leave_mc_groups(struct r
mc = container_of(id_priv->mc_list.next,
struct cma_multicast, list);
list_del(&mc->list);
- switch (rdma_port_link_layer(id_priv->cma_dev->device, id_priv->id.port_num)) {
+ switch (rdma_port_get_link_layer(id_priv->cma_dev->device, id_priv->id.port_num)) {
case IB_LINK_LAYER_INFINIBAND:
ib_sa_free_multicast(mc->multicast.ib);
kfree(mc);
@@ -1793,7 +1793,7 @@ static int cma_resolve_iboe_route(struct
struct sockaddr_in *src_addr = (struct sockaddr_in *)&route->addr.src_addr;
struct sockaddr_in *dst_addr = (struct sockaddr_in *)&route->addr.dst_addr;
struct net_device *ndev = NULL;
- u16 vid = 0;
+ u16 vid;
if (src_addr->sin_family != dst_addr->sin_family)
return -EINVAL;
@@ -1820,9 +1820,7 @@ static int cma_resolve_iboe_route(struct
goto err2;
}
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
- vid = vlan_dev_vlan_id(ndev);
-#endif
+ vid = rdma_vlan_dev_vlan_id(ndev);
iboe_mac_vlan_to_ll(&route->path_rec->sgid, addr->dev_addr.src_dev_addr, vid);
iboe_mac_vlan_to_ll(&route->path_rec->dgid, addr->dev_addr.dst_dev_addr, vid);
@@ -1873,7 +1871,7 @@ int rdma_resolve_route(struct rdma_cm_id
atomic_inc(&id_priv->refcount);
switch (rdma_node_get_transport(id->device->node_type)) {
case RDMA_TRANSPORT_IB:
- switch (rdma_port_link_layer(id->device, id->port_num)) {
+ switch (rdma_port_get_link_layer(id->device, id->port_num)) {
case IB_LINK_LAYER_INFINIBAND:
ret = cma_resolve_ib_route(id_priv, timeout_ms);
break;
@@ -1935,7 +1933,7 @@ port_found:
goto out;
id_priv->id.route.addr.dev_addr.dev_type =
- (rdma_port_link_layer(cma_dev->device, p) == IB_LINK_LAYER_INFINIBAND) ?
+ (rdma_port_get_link_layer(cma_dev->device, p) == IB_LINK_LAYER_INFINIBAND) ?
ARPHRD_INFINIBAND : ARPHRD_ETHER;
rdma_addr_set_sgid(&id_priv->id.route.addr.dev_addr, &gid);
@@ -2408,7 +2406,6 @@ static int cma_sidr_rep_handler(struct i
struct rdma_cm_event event;
struct ib_cm_sidr_rep_event_param *rep = &ib_event->param.sidr_rep_rcvd;
int ret = 0;
- int force_grh;
if (cma_disable_callback(id_priv, CMA_CONNECT))
return 0;
@@ -2438,11 +2435,9 @@ static int cma_sidr_rep_handler(struct i
event.status = -EINVAL;
break;
}
- force_grh = rdma_port_link_layer(cm_id->device, id_priv->id.port_num) ==
- IB_LINK_LAYER_ETHERNET ? 1 : 0;
ib_init_ah_from_path(id_priv->id.device, id_priv->id.port_num,
id_priv->id.route.path_rec,
- &event.param.ud.ah_attr, force_grh);
+ &event.param.ud.ah_attr);
event.param.ud.qp_num = rep->qpn;
event.param.ud.qkey = rep->qkey;
event.event = RDMA_CM_EVENT_ESTABLISHED;
@@ -3010,7 +3005,7 @@ static void cma_iboe_set_mgid(struct soc
}
static int cma_iboe_join_multicast(struct rdma_id_private *id_priv,
- struct cma_multicast *mc)
+ struct cma_multicast *mc)
{
struct iboe_mcast_work *work;
struct rdma_dev_addr *dev_addr = &id_priv->id.route.addr.dev_addr;
@@ -3094,7 +3089,7 @@ int rdma_join_multicast(struct rdma_cm_i
switch (rdma_node_get_transport(id->device->node_type)) {
case RDMA_TRANSPORT_IB:
- switch (rdma_port_link_layer(id->device, id->port_num)) {
+ switch (rdma_port_get_link_layer(id->device, id->port_num)) {
case IB_LINK_LAYER_INFINIBAND:
ret = cma_join_ib_multicast(id_priv, mc);
break;
@@ -3139,7 +3134,7 @@ void rdma_leave_multicast(struct rdma_cm
&mc->multicast.ib->rec.mgid,
mc->multicast.ib->rec.mlid);
if (rdma_node_get_transport(id_priv->cma_dev->device->node_type) == RDMA_TRANSPORT_IB) {
- switch (rdma_port_link_layer(id->device, id->port_num)) {
+ switch (rdma_port_get_link_layer(id->device, id->port_num)) {
case IB_LINK_LAYER_INFINIBAND:
ib_sa_free_multicast(mc->multicast.ib);
kfree(mc);
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/mad.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/mad.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/mad.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -2814,7 +2814,7 @@ static int ib_mad_port_open(struct ib_de
init_mad_qp(port_priv, &port_priv->qp_info[1]);
cq_size = mad_sendq_size + mad_recvq_size;
- has_smi = rdma_port_link_layer(device, port_num) == IB_LINK_LAYER_INFINIBAND;
+ has_smi = rdma_port_get_link_layer(device, port_num) == IB_LINK_LAYER_INFINIBAND;
if (has_smi)
cq_size *= 2;
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/multicast.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/multicast.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/multicast.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -745,7 +745,7 @@ static void mcast_event_handler(struct i
int index;
dev = container_of(handler, struct mcast_device, event_handler);
- if (rdma_port_link_layer(dev->device, event->element.port_num) !=
+ if (rdma_port_get_link_layer(dev->device, event->element.port_num) !=
IB_LINK_LAYER_INFINIBAND)
return;
@@ -776,7 +776,7 @@ static void mcast_add_one(struct ib_devi
if (rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB)
return;
- dev = kzalloc(sizeof *dev + device->phys_port_cnt * sizeof *port,
+ dev = kmalloc(sizeof *dev + device->phys_port_cnt * sizeof *port,
GFP_KERNEL);
if (!dev)
return;
@@ -789,7 +789,7 @@ static void mcast_add_one(struct ib_devi
}
for (i = 0; i <= dev->end_port - dev->start_port; i++) {
- if (rdma_port_link_layer(device, dev->start_port + i) !=
+ if (rdma_port_get_link_layer(device, dev->start_port + i) !=
IB_LINK_LAYER_INFINIBAND)
continue;
port = &dev->port[i];
@@ -828,7 +828,7 @@ static void mcast_remove_one(struct ib_d
flush_workqueue(mcast_wq);
for (i = 0; i <= dev->end_port - dev->start_port; i++) {
- if (rdma_port_link_layer(device, dev->start_port + i) ==
+ if (rdma_port_get_link_layer(device, dev->start_port + i) ==
IB_LINK_LAYER_INFINIBAND) {
port = &dev->port[i];
deref_port(port);
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/sa_query.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/sa_query.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/sa_query.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -580,17 +580,17 @@ static void ib_sa_event(struct ib_event_
struct ib_sa_port *port =
&sa_dev->port[event->element.port_num - sa_dev->start_port];
- if (rdma_port_link_layer(handler->device, port->port_num) == IB_LINK_LAYER_INFINIBAND) {
- spin_lock_irqsave(&port->ah_lock, flags);
- if (port->sm_ah)
- kref_put(&port->sm_ah->ref, free_sm_ah);
- port->sm_ah = NULL;
- spin_unlock_irqrestore(&port->ah_lock, flags);
+ if (rdma_port_get_link_layer(handler->device, port->port_num) != IB_LINK_LAYER_INFINIBAND)
+ return;
- schedule_work(&sa_dev->port[event->element.port_num -
- sa_dev->start_port].update_task);
- }
+ spin_lock_irqsave(&port->ah_lock, flags);
+ if (port->sm_ah)
+ kref_put(&port->sm_ah->ref, free_sm_ah);
+ port->sm_ah = NULL;
+ spin_unlock_irqrestore(&port->ah_lock, flags);
+ schedule_work(&sa_dev->port[event->element.port_num -
+ sa_dev->start_port].update_task);
}
}
@@ -656,11 +656,11 @@ static u8 get_src_path_mask(struct ib_de
}
int ib_init_ah_from_path(struct ib_device *device, u8 port_num,
- struct ib_sa_path_rec *rec, struct ib_ah_attr *ah_attr,
- int force_grh)
+ struct ib_sa_path_rec *rec, struct ib_ah_attr *ah_attr)
{
int ret;
u16 gid_index;
+ int force_grh;
memset(ah_attr, 0, sizeof *ah_attr);
ah_attr->dlid = be16_to_cpu(rec->dlid);
@@ -670,6 +670,8 @@ int ib_init_ah_from_path(struct ib_devic
ah_attr->port_num = port_num;
ah_attr->static_rate = rec->rate;
+ force_grh = rdma_port_get_link_layer(device, port_num) == IB_LINK_LAYER_ETHERNET;
+
if (rec->hop_limit > 1 || force_grh) {
ah_attr->ah_flags = IB_AH_GRH;
ah_attr->grh.dgid = rec->dgid;
@@ -1337,7 +1339,7 @@ static void ib_sa_add_one(struct ib_devi
for (i = 0; i <= e - s; ++i) {
spin_lock_init(&sa_dev->port[i].ah_lock);
- if (rdma_port_link_layer(device, i + 1) != IB_LINK_LAYER_INFINIBAND)
+ if (rdma_port_get_link_layer(device, i + 1) != IB_LINK_LAYER_INFINIBAND)
continue;
sa_dev->port[i].sm_ah = NULL;
@@ -1377,14 +1379,14 @@ static void ib_sa_add_one(struct ib_devi
goto err;
for (i = 0; i <= e - s; ++i)
- if (rdma_port_link_layer(device, i + 1) == IB_LINK_LAYER_INFINIBAND)
+ if (rdma_port_get_link_layer(device, i + 1) == IB_LINK_LAYER_INFINIBAND)
update_sm_ah(&sa_dev->port[i].update_task);
return;
err:
while (--i >= 0)
- if (rdma_port_link_layer(device, i + 1) == IB_LINK_LAYER_INFINIBAND) {
+ if (rdma_port_get_link_layer(device, i + 1) == IB_LINK_LAYER_INFINIBAND) {
if (!IS_ERR(sa_dev->port[i].notice_agent))
ib_unregister_mad_agent(sa_dev->port[i].notice_agent);
if (!IS_ERR(sa_dev->port[i].agent))
@@ -1409,7 +1411,7 @@ static void ib_sa_remove_one(struct ib_d
flush_scheduled_work();
for (i = 0; i <= sa_dev->end_port - sa_dev->start_port; ++i) {
- if (rdma_port_link_layer(device, i + 1) == IB_LINK_LAYER_INFINIBAND) {
+ if (rdma_port_get_link_layer(device, i + 1) == IB_LINK_LAYER_INFINIBAND) {
ib_unregister_mad_agent(sa_dev->port[i].notice_agent);
ib_unregister_mad_agent(sa_dev->port[i].agent);
if (sa_dev->port[i].sm_ah)
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/sysfs.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/sysfs.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/sysfs.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -79,7 +79,7 @@ static ssize_t port_attr_show(struct kob
return port_attr->show(p, port_attr, buf);
}
-static struct sysfs_ops port_sysfs_ops = {
+static const struct sysfs_ops port_sysfs_ops = {
.show = port_attr_show
};
@@ -225,7 +225,7 @@ static ssize_t phys_state_show(struct ib
static ssize_t link_layer_show(struct ib_port *p, struct port_attribute *unused,
char *buf)
{
- switch (rdma_port_link_layer(p->ibdev, p->port_num)) {
+ switch (rdma_port_get_link_layer(p->ibdev, p->port_num)) {
case IB_LINK_LAYER_INFINIBAND:
return sprintf(buf, "%s\n", "IB");
case IB_LINK_LAYER_ETHERNET:
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/ucma.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/ucma.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/ucma.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -49,7 +49,7 @@ MODULE_DESCRIPTION("RDMA Userspace Conne
MODULE_LICENSE("Dual BSD/GPL");
enum {
- UCMA_MAX_BACKLOG = 128
+ UCMA_MAX_BACKLOG = 1024
};
struct ucma_file {
@@ -582,7 +582,7 @@ static void ucma_copy_ib_route(struct rd
}
static void ucma_copy_iboe_route(struct rdma_ucm_query_route_resp *resp,
- struct rdma_route *route)
+ struct rdma_route *route)
{
struct rdma_dev_addr *dev_addr;
struct net_device *dev;
@@ -593,17 +593,16 @@ static void ucma_copy_iboe_route(struct
case 0:
dev_addr = &route->addr.dev_addr;
dev = dev_get_by_index(&init_net, dev_addr->bound_dev_if);
- if (dev) {
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
- vid = vlan_dev_vlan_id(dev);
-#endif
- dev_put(dev);
- }
+ if (dev) {
+ vid = rdma_vlan_dev_vlan_id(dev);
+ dev_put(dev);
+ }
+
iboe_mac_vlan_to_ll((union ib_gid *) &resp->ib_route[0].dgid,
dev_addr->dst_dev_addr, vid);
iboe_addr_get_sgid(dev_addr,
- (union ib_gid *) &resp->ib_route[0].sgid);
+ (union ib_gid *) &resp->ib_route[0].sgid);
resp->ib_route[0].pkey = cpu_to_be16(0xffff);
break;
case 2:
@@ -654,7 +653,7 @@ static ssize_t ucma_query_route(struct u
resp.node_guid = (__force __u64) ctx->cm_id->device->node_guid;
resp.port_num = ctx->cm_id->port_num;
if (rdma_node_get_transport(ctx->cm_id->device->node_type) == RDMA_TRANSPORT_IB) {
- switch (rdma_port_link_layer(ctx->cm_id->device, ctx->cm_id->port_num)) {
+ switch (rdma_port_get_link_layer(ctx->cm_id->device, ctx->cm_id->port_num)) {
case IB_LINK_LAYER_INFINIBAND:
ucma_copy_ib_route(&resp, &ctx->cm_id->route);
break;
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/ud_header.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/ud_header.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/ud_header.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -269,7 +269,7 @@ void ib_ud_header_init(int pay
if (lrh_present)
header->lrh.packet_length = cpu_to_be16(packet_length);
- if (header->immediate_present)
+ if (immediate_present)
header->bth.opcode = IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE;
else
header->bth.opcode = IB_OPCODE_UD_SEND_ONLY;
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/user_mad.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/user_mad.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/user_mad.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -1137,7 +1137,7 @@ static void ib_umad_add_one(struct ib_de
for (i = s; i <= e; ++i) {
umad_dev->port[i - s].umad_dev = umad_dev;
- if (rdma_port_link_layer(device, i) == IB_LINK_LAYER_INFINIBAND)
+ if (rdma_port_get_link_layer(device, i) == IB_LINK_LAYER_INFINIBAND)
if (ib_umad_init_port(device, i, &umad_dev->port[i - s]))
goto err;
}
@@ -1148,7 +1148,7 @@ static void ib_umad_add_one(struct ib_de
err:
while (--i >= s)
- if (rdma_port_link_layer(device, i) == IB_LINK_LAYER_INFINIBAND)
+ if (rdma_port_get_link_layer(device, i) == IB_LINK_LAYER_INFINIBAND)
ib_umad_kill_port(&umad_dev->port[i - s]);
kref_put(&umad_dev->ref, ib_umad_release_dev);
@@ -1163,7 +1163,7 @@ static void ib_umad_remove_one(struct ib
return;
for (i = 0; i <= umad_dev->end_port - umad_dev->start_port; ++i)
- if (rdma_port_link_layer(device, i + 1) == IB_LINK_LAYER_INFINIBAND)
+ if (rdma_port_get_link_layer(device, i + 1) == IB_LINK_LAYER_INFINIBAND)
ib_umad_kill_port(&umad_dev->port[i]);
kref_put(&umad_dev->ref, ib_umad_release_dev);
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs.h
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs.h Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs.h Mon Jan 3 05:14:39 2011 (r216906)
@@ -214,7 +214,6 @@ IB_UVERBS_DECLARE_CMD(modify_xrc_rcv_qp)
IB_UVERBS_DECLARE_CMD(query_xrc_rcv_qp);
IB_UVERBS_DECLARE_CMD(reg_xrc_rcv_qp);
IB_UVERBS_DECLARE_CMD(unreg_xrc_rcv_qp);
-IB_UVERBS_DECLARE_CMD(get_eth_l2_addr);
#endif /* UVERBS_H */
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -1856,38 +1856,6 @@ err:
return ret;
}
-ssize_t ib_uverbs_get_eth_l2_addr(struct ib_uverbs_file *file, const char __user *buf,
- int in_len, int out_len)
-{
- struct ib_uverbs_get_eth_l2_addr cmd;
- struct ib_uverbs_get_eth_l2_addr_resp resp;
- int ret;
- struct ib_pd *pd;
-
- if (out_len < sizeof resp)
- return -ENOSPC;
-
- if (copy_from_user(&cmd, buf, sizeof cmd))
- return -EFAULT;
-
- pd = idr_read_pd(cmd.pd_handle, file->ucontext);
- if (!pd)
- return -EINVAL;
-
- ret = ib_get_eth_l2_addr(pd->device, cmd.port, (union ib_gid *)cmd.gid,
- cmd.sgid_idx, resp.mac, &resp.vlan_id);
- put_pd_read(pd);
- if (!ret) {
- if (copy_to_user((void __user *) (unsigned long) cmd.response,
- &resp, sizeof resp))
- return -EFAULT;
-
- return in_len;
- }
-
- return ret;
-}
-
ssize_t ib_uverbs_destroy_ah(struct ib_uverbs_file *file,
const char __user *buf, int in_len, int out_len)
{
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_main.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_main.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_main.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -117,7 +117,6 @@ static ssize_t (*uverbs_cmd_table[])(str
[IB_USER_VERBS_CMD_QUERY_XRC_RCV_QP] = ib_uverbs_query_xrc_rcv_qp,
[IB_USER_VERBS_CMD_REG_XRC_RCV_QP] = ib_uverbs_reg_xrc_rcv_qp,
[IB_USER_VERBS_CMD_UNREG_XRC_RCV_QP] = ib_uverbs_unreg_xrc_rcv_qp,
- [IB_USER_VERBS_CMD_GET_ETH_L2_ADDR] = ib_uverbs_get_eth_l2_addr,
};
static struct vfsmount *uverbs_event_mnt;
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/core/verbs.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/core/verbs.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/verbs.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -94,7 +94,7 @@ rdma_node_get_transport(enum rdma_node_t
}
EXPORT_SYMBOL(rdma_node_get_transport);
-enum rdma_link_layer rdma_port_link_layer(struct ib_device *device, u8 port_num)
+enum rdma_link_layer rdma_port_get_link_layer(struct ib_device *device, u8 port_num)
{
if (device->get_link_layer)
return device->get_link_layer(device, port_num);
@@ -108,7 +108,7 @@ enum rdma_link_layer rdma_port_link_laye
return IB_LINK_LAYER_UNSPECIFIED;
}
}
-EXPORT_SYMBOL(rdma_port_link_layer);
+EXPORT_SYMBOL(rdma_port_get_link_layer);
/* Protection domains */
@@ -371,8 +371,8 @@ EXPORT_SYMBOL(ib_create_qp);
static const struct {
int valid;
- enum ib_qp_attr_mask req_param[IB_QPT_RAW_ETY + 1];
- enum ib_qp_attr_mask opt_param[IB_QPT_RAW_ETY + 1];
+ enum ib_qp_attr_mask req_param[IB_QPT_RAW_ETH + 1];
+ enum ib_qp_attr_mask opt_param[IB_QPT_RAW_ETH + 1];
} qp_state_table[IB_QPS_ERR + 1][IB_QPS_ERR + 1] = {
[IB_QPS_RESET] = {
[IB_QPS_RESET] = { .valid = 1 },
@@ -382,6 +382,7 @@ static const struct {
[IB_QPT_UD] = (IB_QP_PKEY_INDEX |
IB_QP_PORT |
IB_QP_QKEY),
+ [IB_QPT_RAW_ETH] = IB_QP_PORT,
[IB_QPT_UC] = (IB_QP_PKEY_INDEX |
IB_QP_PORT |
IB_QP_ACCESS_FLAGS),
@@ -1001,9 +1002,21 @@ int ib_attach_mcast(struct ib_qp *qp, un
{
if (!qp->device->attach_mcast)
return -ENOSYS;
- if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
- return -EINVAL;
+ switch (rdma_node_get_transport(qp->device->node_type)) {
+ case RDMA_TRANSPORT_IB:
+ if (qp->qp_type == IB_QPT_RAW_ETH) {
+ /* In raw Etherent mgids the 63 msb's should be 0 */
+ if (gid->global.subnet_prefix & cpu_to_be64(~1ULL))
+ return -EINVAL;
+ } else if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
+ return -EINVAL;
+ break;
+ case RDMA_TRANSPORT_IWARP:
+ if (qp->qp_type != IB_QPT_RAW_ETH)
+ return -EINVAL;
+ break;
+ }
return qp->device->attach_mcast(qp, gid, lid);
}
EXPORT_SYMBOL(ib_attach_mcast);
@@ -1012,9 +1025,21 @@ int ib_detach_mcast(struct ib_qp *qp, un
{
if (!qp->device->detach_mcast)
return -ENOSYS;
- if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
- return -EINVAL;
+ switch (rdma_node_get_transport(qp->device->node_type)) {
+ case RDMA_TRANSPORT_IB:
+ if (qp->qp_type == IB_QPT_RAW_ETH) {
+ /* In raw Etherent mgids the 63 msb's should be 0 */
+ if (gid->global.subnet_prefix & cpu_to_be64(~1ULL))
+ return -EINVAL;
+ } else if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
+ return -EINVAL;
+ break;
+ case RDMA_TRANSPORT_IWARP:
+ if (qp->qp_type != IB_QPT_RAW_ETH)
+ return -EINVAL;
+ break;
+ }
return qp->device->detach_mcast(qp, gid, lid);
}
EXPORT_SYMBOL(ib_detach_mcast);
@@ -1046,12 +1071,3 @@ struct ib_xrcd *ib_alloc_xrcd(struct ib_
}
EXPORT_SYMBOL(ib_alloc_xrcd);
-int ib_get_eth_l2_addr(struct ib_device *device, u8 port, union ib_gid *gid,
- int sgid_idx, u8 *mac, __u16 *vlan_id)
-{
- if (!device->get_eth_l2_addr)
- return -ENOSYS;
-
- return device->get_eth_l2_addr(device, port, gid, sgid_idx, mac, vlan_id);
-}
-EXPORT_SYMBOL(ib_get_eth_l2_addr);
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/debug/memtrack.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/debug/memtrack.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/debug/memtrack.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -435,13 +435,10 @@ static int create_procfs_tree(void)
for (i=0, bit_mask=1; i<MEMTRACK_NUM_OF_MEMTYPES; ++i, bit_mask<<=1) {
if (bit_mask & track_mask) {
proc_ent = create_proc_entry(rsc_names[i], S_IRUGO, memtrack_tree);
- if ( !proc_ent ) {
+ if ( !proc_ent )
goto undo_create_root;
- }
- else {
- proc_ent->proc_fops = &memtrack_proc_fops;
- proc_ent->owner = THIS_MODULE;
- }
+
+ proc_ent->proc_fops = &memtrack_proc_fops;
}
}
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_hal.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_hal.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_hal.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -109,7 +109,6 @@ int cxio_hal_cq_op(struct cxio_rdev *rde
while (!CQ_VLD_ENTRY(rptr, cq->size_log2, cqe)) {
udelay(1);
if (i++ > 1000000) {
- BUG_ON(1);
printk(KERN_ERR "%s: stalled rnic\n",
rdev_p->dev_name);
return -EIO;
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_hal.h
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_hal.h Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_hal.h Mon Jan 3 05:14:39 2011 (r216906)
@@ -52,7 +52,7 @@
#define T3_MAX_PBL_SIZE 256
#define T3_MAX_RQ_SIZE 1024
#define T3_MAX_QP_DEPTH (T3_MAX_RQ_SIZE-1)
-#define T3_MAX_CQ_DEPTH 262144
+#define T3_MAX_CQ_DEPTH 65536
#define T3_MAX_NUM_STAG (1<<15)
#define T3_MAX_MR_SIZE 0x100000000ULL
#define T3_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_resource.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_resource.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_resource.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -39,6 +39,8 @@
#include "cxio_resource.h"
#include "cxio_hal.h"
+#include "genalloc.c"
+
static struct kfifo *rhdl_fifo;
static spinlock_t rhdl_fifo_lock;
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_resource.h
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_resource.h Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_resource.h Mon Jan 3 05:14:39 2011 (r216906)
@@ -38,7 +38,6 @@
#include <linux/kfifo.h>
#include <linux/spinlock.h>
#include <linux/errno.h>
-#include <linux/genalloc.h>
#include "cxio_hal.h"
extern int cxio_hal_init_rhdl_resource(u32 nr_rhdl);
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_cm.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_cm.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_cm.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -486,7 +486,8 @@ static int send_connect(struct iwch_ep *
V_MSS_IDX(mtu_idx) |
V_L2T_IDX(ep->l2t->idx) | V_TX_CHANNEL(ep->l2t->smt_idx);
opt0l = V_TOS((ep->tos >> 2) & M_TOS) | V_RCV_BUFSIZ(rcv_win>>10);
- opt2 = V_FLAVORS_VALID(1) | V_CONG_CONTROL_FLAVOR(cong_flavor);
+ opt2 = F_RX_COALESCE_VALID | V_RX_COALESCE(0) | V_FLAVORS_VALID(1) |
+ V_CONG_CONTROL_FLAVOR(cong_flavor);
skb->priority = CPL_PRIORITY_SETUP;
set_arp_failure_handler(skb, act_open_req_arp_failure);
@@ -1303,7 +1304,8 @@ static void accept_cr(struct iwch_ep *ep
V_MSS_IDX(mtu_idx) |
V_L2T_IDX(ep->l2t->idx) | V_TX_CHANNEL(ep->l2t->smt_idx);
opt0l = V_TOS((ep->tos >> 2) & M_TOS) | V_RCV_BUFSIZ(rcv_win>>10);
- opt2 = V_FLAVORS_VALID(1) | V_CONG_CONTROL_FLAVOR(cong_flavor);
+ opt2 = F_RX_COALESCE_VALID | V_RX_COALESCE(0) | V_FLAVORS_VALID(1) |
+ V_CONG_CONTROL_FLAVOR(cong_flavor);
rpl = cplhdr(skb);
rpl->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_main.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_main.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_main.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -359,7 +359,8 @@ static int ehca_sense_attributes(struct
* a firmware property, so it's valid across all adapters
*/
if (ehca_lock_hcalls == -1)
- ehca_lock_hcalls = !(shca->hca_cap & HCA_CAP_H_ALLOC_RES_SYNC);
+ ehca_lock_hcalls = !EHCA_BMASK_GET(HCA_CAP_H_ALLOC_RES_SYNC,
+ shca->hca_cap);
/* translate supported MR page sizes; always support 4K */
shca->hca_cap_mr_pgsize = EHCA_PAGESIZE;
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/ah.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/ah.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/ah.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -100,15 +100,19 @@ static struct ib_ah *create_iboe_ah(stru
int err;
int is_mcast;
u16 vlan_tag;
+ union ib_gid sgid;
err = mlx4_ib_resolve_grh(ibdev, ah_attr, mac, &is_mcast, ah_attr->port_num);
if (err)
return ERR_PTR(err);
- memcpy(ah->av.eth.mac_0_1, mac, 2);
- memcpy(ah->av.eth.mac_2_5, mac + 2, 4);
- vlan_tag = rdma_get_vlan_id(&ah_attr->grh.dgid);
- vlan_tag |= (ah_attr->sl & 7) << 13;
+ memcpy(ah->av.eth.mac, mac, 6);
+ err = ib_get_cached_gid(pd->device, ah_attr->port_num, ah_attr->grh.sgid_index, &sgid);
+ if (err)
+ return ERR_PTR(err);
+ vlan_tag = rdma_get_vlan_id(&sgid);
+ if (vlan_tag < 0x1000)
+ vlan_tag |= (ah_attr->sl & 7) << 13;
ah->av.eth.port_pd = cpu_to_be32(to_mpd(pd)->pdn | (ah_attr->port_num << 24));
ah->av.eth.gid_index = ah_attr->grh.sgid_index;
ah->av.eth.vlan = cpu_to_be16(vlan_tag);
@@ -140,7 +144,7 @@ struct ib_ah *mlx4_ib_create_ah(struct i
if (!ah)
return ERR_PTR(-ENOMEM);
- if (rdma_port_link_layer(pd->device, ah_attr->port_num) == IB_LINK_LAYER_ETHERNET) {
+ if (rdma_port_get_link_layer(pd->device, ah_attr->port_num) == IB_LINK_LAYER_ETHERNET) {
if (!(ah_attr->ah_flags & IB_AH_GRH)) {
ret = ERR_PTR(-EINVAL);
goto out;
@@ -172,7 +176,7 @@ int mlx4_ib_query_ah(struct ib_ah *ibah,
memset(ah_attr, 0, sizeof *ah_attr);
ah_attr->sl = be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 28;
ah_attr->port_num = be32_to_cpu(ah->av.ib.port_pd) >> 24;
- ll = rdma_port_link_layer(ibah->device, ah_attr->port_num);
+ ll = rdma_port_get_link_layer(ibah->device, ah_attr->port_num);
ah_attr->dlid = ll == IB_LINK_LAYER_INFINIBAND ? be16_to_cpu(ah->av.ib.dlid) : 0;
if (ah->av.ib.stat_rate)
ah_attr->static_rate = ah->av.ib.stat_rate - MLX4_STAT_RATE_OFFSET;
@@ -199,26 +203,3 @@ int mlx4_ib_destroy_ah(struct ib_ah *ah)
return 0;
}
-int mlx4_ib_get_eth_l2_addr(struct ib_device *device, u8 port, union ib_gid *dgid,
- int sgid_idx, u8 *mac, u16 *vlan_id)
-{
- int err;
- struct mlx4_ib_dev *ibdev = to_mdev(device);
- struct ib_ah_attr ah_attr = {
- .port_num = port,
- };
- int is_mcast;
- union ib_gid sgid;
-
- memcpy(ah_attr.grh.dgid.raw, dgid, 16);
- err = mlx4_ib_resolve_grh(ibdev, &ah_attr, mac, &is_mcast, port);
- if (err)
- ERR_PTR(err);
-
- err = ib_get_cached_gid(device, port, sgid_idx, &sgid);
- if (err)
- return err;
- *vlan_id = rdma_get_vlan_id(&sgid);
- return 0;
-}
-
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/cq.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/cq.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/cq.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -407,10 +407,14 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq
cq->resize_buf = NULL;
cq->resize_umem = NULL;
} else {
+ struct mlx4_ib_cq_buf tmp_buf;
+ int tmp_cqe = 0;
+
spin_lock_irq(&cq->lock);
if (cq->resize_buf) {
mlx4_ib_cq_resize_copy_cqes(cq);
- mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe);
+ tmp_buf = cq->buf;
+ tmp_cqe = cq->ibcq.cqe;
cq->buf = cq->resize_buf->buf;
cq->ibcq.cqe = cq->resize_buf->cqe;
@@ -418,6 +422,9 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq
cq->resize_buf = NULL;
}
spin_unlock_irq(&cq->lock);
+
+ if (tmp_cqe)
+ mlx4_ib_free_cq_buf(dev, &tmp_buf, tmp_cqe);
}
goto out;
@@ -785,7 +792,7 @@ int mlx4_ib_arm_cq(struct ib_cq *ibcq, e
mlx4_cq_arm(&to_mcq(ibcq)->mcq,
(flags & IB_CQ_SOLICITED_MASK) == IB_CQ_SOLICITED ?
MLX4_CQ_DB_REQ_NOT_SOL : MLX4_CQ_DB_REQ_NOT,
- to_mdev(ibcq->device)->uar_map,
+ to_mdev(ibcq->device)->priv_uar.map,
MLX4_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->uar_lock));
return 0;
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/mad.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -229,6 +229,16 @@ static void forward_trap(struct mlx4_ib_
}
}
+static int is_vendor_id(__be16 attr_id)
+{
+ return (attr_id & IB_SMP_ATTR_VENDOR_MASK) == IB_SMP_ATTR_VENDOR_MASK;
+}
+
+static int supported_vendor_id(__be16 attr_id)
+{
+ return 1;
+}
+
static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
struct ib_wc *in_wc, struct ib_grh *in_grh,
struct ib_mad *in_mad, struct ib_mad *out_mad)
@@ -256,8 +266,8 @@ static int ib_process_mad(struct ib_devi
* MADs -- the SMA can't handle them.
*/
if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO ||
- ((in_mad->mad_hdr.attr_id & IB_SMP_ATTR_VENDOR_MASK) ==
- IB_SMP_ATTR_VENDOR_MASK))
+ (is_vendor_id(in_mad->mad_hdr.attr_id) &&
+ !supported_vendor_id(in_mad->mad_hdr.attr_id)))
return IB_MAD_RESULT_SUCCESS;
} else if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT ||
in_mad->mad_hdr.mgmt_class == MLX4_IB_VENDOR_CLASS1 ||
@@ -343,6 +353,7 @@ static int rdmaoe_process_mad(struct ib_
if (err)
err = IB_MAD_RESULT_FAILURE;
else {
+ memset(out_mad->data, 0, sizeof out_mad->data);
mode = be32_to_cpu(((struct mlx4_counters *)mailbox->buf)->counter_mode) & 0xf;
switch (mode) {
case 0:
@@ -367,7 +378,7 @@ int mlx4_ib_process_mad(struct ib_device
struct ib_wc *in_wc, struct ib_grh *in_grh,
struct ib_mad *in_mad, struct ib_mad *out_mad)
{
- switch (rdma_port_link_layer(ibdev, port_num)) {
+ switch (rdma_port_get_link_layer(ibdev, port_num)) {
case IB_LINK_LAYER_INFINIBAND:
return ib_process_mad(ibdev, mad_flags, port_num, in_wc,
in_grh, in_mad, out_mad);
@@ -393,7 +404,7 @@ int mlx4_ib_mad_init(struct mlx4_ib_dev
enum rdma_link_layer ll;
for (p = 0; p < dev->num_ports; ++p) {
- ll = rdma_port_link_layer(&dev->ib_dev, p + 1);
+ ll = rdma_port_get_link_layer(&dev->ib_dev, p + 1);
for (q = 0; q <= 1; ++q) {
if (ll == IB_LINK_LAYER_INFINIBAND) {
agent = ib_register_mad_agent(&dev->ib_dev, p + 1,
Modified: projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/main.c
==============================================================================
--- projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/main.c Mon Jan 3 03:34:59 2011 (r216905)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/main.c Mon Jan 3 05:14:39 2011 (r216906)
@@ -51,8 +51,8 @@
#include "wc.h"
#define DRV_NAME MLX4_IB_DRV_NAME
-#define DRV_VERSION "1.0-ofed1.5.1"
-#define DRV_RELDATE "April 4, 2008"
+#define DRV_VERSION "1.0-ofed1.5.2"
+#define DRV_RELDATE "August 4, 2010"
MODULE_AUTHOR("Roland Dreier");
MODULE_DESCRIPTION("Mellanox ConnectX HCA InfiniBand driver");
@@ -169,7 +169,7 @@ static int mlx4_ib_query_device(struct i
props->max_srq = dev->dev->caps.num_srqs - dev->dev->caps.reserved_srqs;
props->max_srq_wr = dev->dev->caps.max_srq_wqes - 1;
props->max_srq_sge = dev->dev->caps.max_srq_sge;
- props->max_fast_reg_page_list_len = PAGE_SIZE / sizeof (u64);
+ props->max_fast_reg_page_list_len = MAX_FAST_REG_PAGES;
props->local_ca_ack_delay = dev->dev->caps.local_ca_ack_delay;
props->atomic_cap = dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_ATOMIC ?
IB_ATOMIC_HCA : IB_ATOMIC_NONE;
@@ -263,35 +263,10 @@ static int eth_link_query_port(struct ib
{
struct mlx4_ib_iboe *iboe = &to_mdev(ibdev)->iboe;
struct net_device *ndev;
- struct mlx4_cmd_mailbox *mailbox;
- struct mlx4_dev *dev = to_mdev(ibdev)->dev;
- int err;
- u32 *outbox;
- u32 fl;
enum ib_mtu tmp;
- mailbox = mlx4_alloc_cmd_mailbox(dev);
- if (IS_ERR(mailbox))
- return PTR_ERR(mailbox);
-
- err = mlx4_cmd_box(dev, 0, mailbox->dma, port, 0, MLX4_CMD_QUERY_PORT,
- MLX4_CMD_TIME_CLASS_B);
- if (err)
- goto out;
- outbox = mailbox->buf;
-
- fl = be32_to_cpu(outbox[0x40 / 4]);
- if (fl & 1 << 31)
- props->active_width = eth_to_ib_width(fl & 0xffff);
- else
- props->active_width = IB_WIDTH_1X;
-
- fl = be32_to_cpu(outbox[0x44 / 4]);
- if (fl & 1 << 31)
- props->active_speed = eth_to_ib_speed(fl & 0xffff);
- else
- props->active_speed = 1;
-
+ props->active_width = IB_WIDTH_4X;
+ props->active_speed = 1;
props->port_cap_flags = IB_PORT_CM_SUP;
props->gid_tbl_len = to_mdev(ibdev)->dev->caps.gid_table_len[port];
props->max_msg_sz = to_mdev(ibdev)->dev->caps.max_msg_sz;
@@ -309,19 +284,17 @@ static int eth_link_query_port(struct ib
spin_lock(&iboe->lock);
ndev = iboe->netdevs[port - 1];
if (!ndev)
- goto out_ul;
+ goto out;
tmp = iboe_get_mtu(ndev->mtu);
- props->active_mtu = tmp ? min(props->max_mtu, tmp) : 0;
- props->state = netif_running(ndev) && netif_oper_up(ndev) ?
+ props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256;
+ props->state = netif_carrier_ok(ndev) && netif_oper_up(ndev) ?
IB_PORT_ACTIVE : IB_PORT_DOWN;
props->phys_state = state_to_phys_state(props->state);
-out_ul:
- spin_unlock(&iboe->lock);
out:
- mlx4_free_cmd_mailbox(dev, mailbox);
- return err;
+ spin_unlock(&iboe->lock);
+ return 0;
}
static int mlx4_ib_query_port(struct ib_device *ibdev, u8 port,
@@ -408,7 +381,7 @@ static int iboe_query_gid(struct ib_devi
static int mlx4_ib_query_gid(struct ib_device *ibdev, u8 port, int index,
union ib_gid *gid)
{
- if (rdma_port_link_layer(ibdev, port) == IB_LINK_LAYER_INFINIBAND)
+ if (rdma_port_get_link_layer(ibdev, port) == IB_LINK_LAYER_INFINIBAND)
return __mlx4_ib_query_gid(ibdev, port, index, gid);
else
return iboe_query_gid(ibdev, port, index, gid);
@@ -445,14 +418,34 @@ out:
static int mlx4_ib_modify_device(struct ib_device *ibdev, int mask,
struct ib_device_modify *props)
{
+ struct mlx4_cmd_mailbox *mailbox;
+ int err;
+
if (mask & ~IB_DEVICE_MODIFY_NODE_DESC)
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list