aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes_verbs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-07 20:08:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-07 20:08:02 -0400
commit3cc08fc35db75b059118626c30b60b0f56583802 (patch)
tree704d71199c8be8d5b822ca424675291e8cec7bde /drivers/infiniband/hw/nes/nes_verbs.c
parentfaa38b5e0e092914764cdba9f83d31a3f794d182 (diff)
parent03b37ecdb3975f09832747600853d3818a50eda3 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (42 commits) IB/qib: Add missing <linux/slab.h> include IB/ehca: Drop unnecessary NULL test RDMA/nes: Fix confusing if statement indentation IB/ehca: Init irq tasklet before irq can happen RDMA/nes: Fix misindented code RDMA/nes: Fix showing wqm_quanta RDMA/nes: Get rid of "set but not used" variables RDMA/nes: Read firmware version from correct place IB/srp: Export req_lim via sysfs IB/srp: Make receive buffer handling more robust IB/srp: Use print_hex_dump() IB: Rename RAW_ETY to RAW_ETHERTYPE RDMA/nes: Fix two sparse warnings RDMA/cxgb3: Make needlessly global iwch_l2t_send() static IB/iser: Make needlessly global iser_alloc_rx_descriptors() static RDMA/cxgb4: Add timeouts when waiting for FW responses IB/qib: Fix race between qib_error_qp() and receive packet processing IB/qib: Limit the number of packets processed per interrupt IB/qib: Allow writes to the diag_counters to be able to clear them IB/qib: Set cfgctxts to number of CPUs by default ...
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_verbs.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 9bc2d744b2ea..9046e6675686 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -518,7 +518,7 @@ static int nes_query_device(struct ib_device *ibdev, struct ib_device_attr *prop
518 memset(props, 0, sizeof(*props)); 518 memset(props, 0, sizeof(*props));
519 memcpy(&props->sys_image_guid, nesvnic->netdev->dev_addr, 6); 519 memcpy(&props->sys_image_guid, nesvnic->netdev->dev_addr, 6);
520 520
521 props->fw_ver = nesdev->nesadapter->fw_ver; 521 props->fw_ver = nesdev->nesadapter->firmware_version;
522 props->device_cap_flags = nesdev->nesadapter->device_cap_flags; 522 props->device_cap_flags = nesdev->nesadapter->device_cap_flags;
523 props->vendor_id = nesdev->nesadapter->vendor_id; 523 props->vendor_id = nesdev->nesadapter->vendor_id;
524 props->vendor_part_id = nesdev->nesadapter->vendor_part_id; 524 props->vendor_part_id = nesdev->nesadapter->vendor_part_id;
@@ -1941,7 +1941,7 @@ static int nes_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd,
1941 u8 use_256_pbls = 0; 1941 u8 use_256_pbls = 0;
1942 u8 use_4k_pbls = 0; 1942 u8 use_4k_pbls = 0;
1943 u16 use_two_level = (pbl_count_4k > 1) ? 1 : 0; 1943 u16 use_two_level = (pbl_count_4k > 1) ? 1 : 0;
1944 struct nes_root_vpbl new_root = {0, 0, 0}; 1944 struct nes_root_vpbl new_root = { 0, NULL, NULL };
1945 u32 opcode = 0; 1945 u32 opcode = 0;
1946 u16 major_code; 1946 u16 major_code;
1947 1947
@@ -2112,13 +2112,12 @@ static struct ib_mr *nes_reg_phys_mr(struct ib_pd *ib_pd,
2112 u32 driver_key = 0; 2112 u32 driver_key = 0;
2113 u32 root_pbl_index = 0; 2113 u32 root_pbl_index = 0;
2114 u32 cur_pbl_index = 0; 2114 u32 cur_pbl_index = 0;
2115 int err = 0, pbl_depth = 0; 2115 int err = 0;
2116 int ret = 0; 2116 int ret = 0;
2117 u16 pbl_count = 0; 2117 u16 pbl_count = 0;
2118 u8 single_page = 1; 2118 u8 single_page = 1;
2119 u8 stag_key = 0; 2119 u8 stag_key = 0;
2120 2120
2121 pbl_depth = 0;
2122 region_length = 0; 2121 region_length = 0;
2123 vpbl.pbl_vbase = NULL; 2122 vpbl.pbl_vbase = NULL;
2124 root_vpbl.pbl_vbase = NULL; 2123 root_vpbl.pbl_vbase = NULL;
@@ -2931,7 +2930,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
2931 int ret; 2930 int ret;
2932 u16 original_last_aeq; 2931 u16 original_last_aeq;
2933 u8 issue_modify_qp = 0; 2932 u8 issue_modify_qp = 0;
2934 u8 issue_disconnect = 0;
2935 u8 dont_wait = 0; 2933 u8 dont_wait = 0;
2936 2934
2937 nes_debug(NES_DBG_MOD_QP, "QP%u: QP State=%u, cur QP State=%u," 2935 nes_debug(NES_DBG_MOD_QP, "QP%u: QP State=%u, cur QP State=%u,"
@@ -3058,6 +3056,7 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
3058 nesqp->hte_added = 0; 3056 nesqp->hte_added = 0;
3059 } 3057 }
3060 if ((nesqp->hw_tcp_state > NES_AEQE_TCP_STATE_CLOSED) && 3058 if ((nesqp->hw_tcp_state > NES_AEQE_TCP_STATE_CLOSED) &&
3059 (nesdev->iw_status) &&
3061 (nesqp->hw_tcp_state != NES_AEQE_TCP_STATE_TIME_WAIT)) { 3060 (nesqp->hw_tcp_state != NES_AEQE_TCP_STATE_TIME_WAIT)) {
3062 next_iwarp_state |= NES_CQP_QP_RESET; 3061 next_iwarp_state |= NES_CQP_QP_RESET;
3063 } else { 3062 } else {
@@ -3082,7 +3081,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
3082 nesqp->iwarp_state = next_iwarp_state & NES_CQP_QP_IWARP_STATE_MASK; 3081 nesqp->iwarp_state = next_iwarp_state & NES_CQP_QP_IWARP_STATE_MASK;
3083 nes_debug(NES_DBG_MOD_QP, "Change nesqp->iwarp_state=%08x\n", 3082 nes_debug(NES_DBG_MOD_QP, "Change nesqp->iwarp_state=%08x\n",
3084 nesqp->iwarp_state); 3083 nesqp->iwarp_state);
3085 issue_disconnect = 1;
3086 } else { 3084 } else {
3087 nesqp->iwarp_state = next_iwarp_state & NES_CQP_QP_IWARP_STATE_MASK; 3085 nesqp->iwarp_state = next_iwarp_state & NES_CQP_QP_IWARP_STATE_MASK;
3088 nes_debug(NES_DBG_MOD_QP, "Change nesqp->iwarp_state=%08x\n", 3086 nes_debug(NES_DBG_MOD_QP, "Change nesqp->iwarp_state=%08x\n",
@@ -3936,6 +3934,17 @@ struct nes_ib_device *nes_init_ofa_device(struct net_device *netdev)
3936 return nesibdev; 3934 return nesibdev;
3937} 3935}
3938 3936
3937void nes_port_ibevent(struct nes_vnic *nesvnic)
3938{
3939 struct nes_ib_device *nesibdev = nesvnic->nesibdev;
3940 struct nes_device *nesdev = nesvnic->nesdev;
3941 struct ib_event event;
3942 event.device = &nesibdev->ibdev;
3943 event.element.port_num = nesvnic->logical_port + 1;
3944 event.event = nesdev->iw_status ? IB_EVENT_PORT_ACTIVE : IB_EVENT_PORT_ERR;
3945 ib_dispatch_event(&event);
3946}
3947
3939 3948
3940/** 3949/**
3941 * nes_destroy_ofa_device 3950 * nes_destroy_ofa_device