Skip to content

Commit

Permalink
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband: (47 commits)
  IB/mthca: Query SRQ srq_limit fixes
  IPoIB: Get rid of useless test of queue length
  IB/mthca: Correct reported SRQ size in MemFree case.
  IB/mad: Fix oopsable race on device removal
  IB/srp: Coverity fix to srp_parse_options()
  IB/mthca: Coverity fix to mthca_init_eq_table()
  IB: Coverity fixes to sysfs.c
  IPoIB: Move ipoib_ib_dev_flush() to ipoib workqueue
  IPoIB: Fix build now that neighbour destructor is in neigh_params
  IB/uverbs: Use correct alt_pkey_index in modify QP
  IB/umad: Add support for large RMPP transfers
  IB/srp: Add SCSI host attributes to show target port
  IB/cm: Check cm_id state before handling a REP
  IB/mthca: Update firmware versions
  IB/mthca: Optimize large messages on Sinai HCAs
  IB/uverbs: Fix query QP return of sq_sig_all
  IB: Fix modify QP checking of "current QP state" attribute
  IPoIB: Fix multicast race between canceling and completing
  IPoIB: Clean up if posting receives fails
  IB/mthca: Use an enum for HCA page size
  ...
  • Loading branch information
Linus Torvalds committed Mar 21, 2006
2 parents 28c006c + fd02e80 commit 52aef81
Show file tree
Hide file tree
Showing 42 changed files with 2,097 additions and 814 deletions.
19 changes: 0 additions & 19 deletions drivers/infiniband/core/agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,6 @@ ib_get_agent_port(struct ib_device *device, int port_num)
return entry;
}

int smi_check_local_dr_smp(struct ib_smp *smp,
struct ib_device *device,
int port_num)
{
struct ib_agent_port_private *port_priv;

if (smp->mgmt_class != IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)
return 1;

port_priv = ib_get_agent_port(device, port_num);
if (!port_priv) {
printk(KERN_DEBUG SPFX "smi_check_local_dr_smp %s port %d "
"not open\n", device->name, port_num);
return 1;
}

return smi_check_local_smp(port_priv->agent[0], smp);
}

int agent_send_response(struct ib_mad *mad, struct ib_grh *grh,
struct ib_wc *wc, struct ib_device *device,
int port_num, int qpn)
Expand Down
42 changes: 24 additions & 18 deletions drivers/infiniband/core/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct cm_id_private {

struct rb_node service_node;
struct rb_node sidr_id_node;
spinlock_t lock;
spinlock_t lock; /* Do not acquire inside cm.lock */
wait_queue_head_t wait;
atomic_t refcount;

Expand Down Expand Up @@ -1547,40 +1547,46 @@ static int cm_rep_handler(struct cm_work *work)
return -EINVAL;
}

cm_format_rep_event(work);

spin_lock_irqsave(&cm_id_priv->lock, flags);
switch (cm_id_priv->id.state) {
case IB_CM_REQ_SENT:
case IB_CM_MRA_REQ_RCVD:
break;
default:
spin_unlock_irqrestore(&cm_id_priv->lock, flags);
ret = -EINVAL;
goto error;
}

cm_id_priv->timewait_info->work.remote_id = rep_msg->local_comm_id;
cm_id_priv->timewait_info->remote_ca_guid = rep_msg->local_ca_guid;
cm_id_priv->timewait_info->remote_qpn = cm_rep_get_local_qpn(rep_msg);

spin_lock_irqsave(&cm.lock, flags);
spin_lock(&cm.lock);
/* Check for duplicate REP. */
if (cm_insert_remote_id(cm_id_priv->timewait_info)) {
spin_unlock_irqrestore(&cm.lock, flags);
spin_unlock(&cm.lock);
spin_unlock_irqrestore(&cm_id_priv->lock, flags);
ret = -EINVAL;
goto error;
}
/* Check for a stale connection. */
if (cm_insert_remote_qpn(cm_id_priv->timewait_info)) {
spin_unlock_irqrestore(&cm.lock, flags);
rb_erase(&cm_id_priv->timewait_info->remote_id_node,
&cm.remote_id_table);
cm_id_priv->timewait_info->inserted_remote_id = 0;
spin_unlock(&cm.lock);
spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_issue_rej(work->port, work->mad_recv_wc,
IB_CM_REJ_STALE_CONN, CM_MSG_RESPONSE_REP,
NULL, 0);
ret = -EINVAL;
goto error;
}
spin_unlock_irqrestore(&cm.lock, flags);

cm_format_rep_event(work);
spin_unlock(&cm.lock);

spin_lock_irqsave(&cm_id_priv->lock, flags);
switch (cm_id_priv->id.state) {
case IB_CM_REQ_SENT:
case IB_CM_MRA_REQ_RCVD:
break;
default:
spin_unlock_irqrestore(&cm_id_priv->lock, flags);
ret = -EINVAL;
goto error;
}
cm_id_priv->id.state = IB_CM_REP_RCVD;
cm_id_priv->id.remote_id = rep_msg->local_comm_id;
cm_id_priv->remote_qpn = cm_rep_get_local_qpn(rep_msg);
Expand All @@ -1603,7 +1609,7 @@ static int cm_rep_handler(struct cm_work *work)
cm_deref_id(cm_id_priv);
return 0;

error: cm_cleanup_timewait(cm_id_priv->timewait_info);
error:
cm_deref_id(cm_id_priv);
return ret;
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/infiniband/core/fmr_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
{
struct ib_pool_fmr *fmr;
struct ib_fmr_attr attr = {
.max_pages = params->max_pages_per_fmr,
.max_maps = IB_FMR_MAX_REMAPS,
.page_size = PAGE_SHIFT
.max_pages = params->max_pages_per_fmr,
.max_maps = IB_FMR_MAX_REMAPS,
.page_shift = params->page_shift
};

for (i = 0; i < params->pool_size; ++i) {
Expand Down
Loading

0 comments on commit 52aef81

Please sign in to comment.