Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302620
b: refs/heads/master
c: 6a4ab66
h: refs/heads/master
v: v3
  • Loading branch information
Parav Pandit authored and Roland Dreier committed May 8, 2012
1 parent bc347c6 commit 05be349
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 784d135f967849cb51c7e8d0c5230734f893331c
refs/heads/master: 6a4ab669ad0b0eadb042383ef7677a84a68a0e0e
7 changes: 1 addition & 6 deletions trunk/drivers/infiniband/hw/nes/nes_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2884,8 +2884,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
ibevent.device = nesqp->ibqp.device;
ibevent.event = nesqp->terminate_eventtype;
ibevent.element.qp = &nesqp->ibqp;
if (nesqp->ibqp.event_handler)
nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
}
}

Expand Down Expand Up @@ -3321,10 +3320,6 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)

nesqp->private_data_len = conn_param->private_data_len;
nesqp->nesqp_context->ird_ord_sizes |= cpu_to_le32((u32)conn_param->ord);
/* space for rdma0 read msg */
if (conn_param->ord == 0)
nesqp->nesqp_context->ird_ord_sizes |= cpu_to_le32(1);

nes_debug(NES_DBG_CM, "requested ord = 0x%08X.\n", (u32)conn_param->ord);
nes_debug(NES_DBG_CM, "mpa private data len =%u\n",
conn_param->private_data_len);
Expand Down
39 changes: 39 additions & 0 deletions trunk/drivers/net/ethernet/emulex/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Costa Mesa, CA 92626
*/

#include <linux/module.h>
#include "be.h"
#include "be_cmds.h"

Expand Down Expand Up @@ -2556,3 +2557,41 @@ int be_cmd_get_acpi_wol_cap(struct be_adapter *adapter)
pci_free_consistent(adapter->pdev, cmd.size, cmd.va, cmd.dma);
return status;
}

int be_roce_mcc_cmd(void *netdev_handle, void *wrb_payload,
int wrb_payload_size, u16 *cmd_status, u16 *ext_status)
{
struct be_adapter *adapter = netdev_priv(netdev_handle);
struct be_mcc_wrb *wrb;
struct be_cmd_req_hdr *hdr = (struct be_cmd_req_hdr *) wrb_payload;
struct be_cmd_req_hdr *req;
struct be_cmd_resp_hdr *resp;
int status;

spin_lock_bh(&adapter->mcc_lock);

wrb = wrb_from_mccq(adapter);
if (!wrb) {
status = -EBUSY;
goto err;
}
req = embedded_payload(wrb);
resp = embedded_payload(wrb);

be_wrb_cmd_hdr_prepare(req, hdr->subsystem,
hdr->opcode, wrb_payload_size, wrb, NULL);
memcpy(req, wrb_payload, wrb_payload_size);
be_dws_cpu_to_le(req, wrb_payload_size);

status = be_mcc_notify_wait(adapter);
if (cmd_status)
*cmd_status = (status & 0xffff);
if (ext_status)
*ext_status = 0;
memcpy(wrb_payload, resp, sizeof(*resp) + resp->response_length);
be_dws_le_to_cpu(wrb_payload, sizeof(*resp) + resp->response_length);
err:
spin_unlock_bh(&adapter->mcc_lock);
return status;
}
EXPORT_SYMBOL(be_roce_mcc_cmd);

0 comments on commit 05be349

Please sign in to comment.