aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/nes/nes.c5
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.c8
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.c3
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c2
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c5
5 files changed, 2 insertions, 21 deletions
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index 16b783232e1f..969a01c1b11e 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -259,13 +259,11 @@ static void nes_cqp_rem_ref_callback(struct nes_device *nesdev, struct nes_cqp_r
259 unsigned long flags; 259 unsigned long flags;
260 struct nes_qp *nesqp = cqp_request->cqp_callback_pointer; 260 struct nes_qp *nesqp = cqp_request->cqp_callback_pointer;
261 struct nes_adapter *nesadapter = nesdev->nesadapter; 261 struct nes_adapter *nesadapter = nesdev->nesadapter;
262 u32 qp_id;
263 262
264 atomic_inc(&qps_destroyed); 263 atomic_inc(&qps_destroyed);
265 264
266 /* Free the control structures */ 265 /* Free the control structures */
267 266
268 qp_id = nesqp->hwqp.qp_id;
269 if (nesqp->pbl_vbase) { 267 if (nesqp->pbl_vbase) {
270 pci_free_consistent(nesdev->pcidev, nesqp->qp_mem_size, 268 pci_free_consistent(nesdev->pcidev, nesqp->qp_mem_size,
271 nesqp->hwqp.q2_vbase, nesqp->hwqp.q2_pbase); 269 nesqp->hwqp.q2_vbase, nesqp->hwqp.q2_pbase);
@@ -441,7 +439,6 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
441 struct net_device *netdev = NULL; 439 struct net_device *netdev = NULL;
442 struct nes_device *nesdev = NULL; 440 struct nes_device *nesdev = NULL;
443 int ret = 0; 441 int ret = 0;
444 struct nes_vnic *nesvnic = NULL;
445 void __iomem *mmio_regs = NULL; 442 void __iomem *mmio_regs = NULL;
446 u8 hw_rev; 443 u8 hw_rev;
447 444
@@ -677,8 +674,6 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
677 } 674 }
678 675
679 nes_print_macaddr(netdev); 676 nes_print_macaddr(netdev);
680 /* create a CM core for this netdev */
681 nesvnic = netdev_priv(netdev);
682 677
683 nesdev->netdev_count++; 678 nesdev->netdev_count++;
684 nesdev->nesadapter->netdev_count++; 679 nesdev->nesadapter->netdev_count++;
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index d400fa9de8b8..8bc11e183803 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1719,8 +1719,6 @@ static int handle_ack_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
1719{ 1719{
1720 int datasize = 0; 1720 int datasize = 0;
1721 u32 inc_sequence; 1721 u32 inc_sequence;
1722 u32 rem_seq_ack;
1723 u32 rem_seq;
1724 int ret = 0; 1722 int ret = 0;
1725 int optionsize; 1723 int optionsize;
1726 optionsize = (tcph->doff << 2) - sizeof(struct tcphdr); 1724 optionsize = (tcph->doff << 2) - sizeof(struct tcphdr);
@@ -1730,8 +1728,6 @@ static int handle_ack_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
1730 1728
1731 skb_pull(skb, tcph->doff << 2); 1729 skb_pull(skb, tcph->doff << 2);
1732 inc_sequence = ntohl(tcph->seq); 1730 inc_sequence = ntohl(tcph->seq);
1733 rem_seq = ntohl(tcph->seq);
1734 rem_seq_ack = ntohl(tcph->ack_seq);
1735 datasize = skb->len; 1731 datasize = skb->len;
1736 switch (cm_node->state) { 1732 switch (cm_node->state) {
1737 case NES_CM_STATE_SYN_RCVD: 1733 case NES_CM_STATE_SYN_RCVD:
@@ -3128,17 +3124,15 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog)
3128 struct nes_vnic *nesvnic; 3124 struct nes_vnic *nesvnic;
3129 struct nes_cm_listener *cm_node; 3125 struct nes_cm_listener *cm_node;
3130 struct nes_cm_info cm_info; 3126 struct nes_cm_info cm_info;
3131 struct nes_adapter *adapter;
3132 int err; 3127 int err;
3133 3128
3134
3135 nes_debug(NES_DBG_CM, "cm_id = %p, local port = 0x%04X.\n", 3129 nes_debug(NES_DBG_CM, "cm_id = %p, local port = 0x%04X.\n",
3136 cm_id, ntohs(cm_id->local_addr.sin_port)); 3130 cm_id, ntohs(cm_id->local_addr.sin_port));
3137 3131
3138 nesvnic = to_nesvnic(cm_id->device); 3132 nesvnic = to_nesvnic(cm_id->device);
3139 if (!nesvnic) 3133 if (!nesvnic)
3140 return -EINVAL; 3134 return -EINVAL;
3141 adapter = nesvnic->nesdev->nesadapter; 3135
3142 nes_debug(NES_DBG_CM, "nesvnic=%p, netdev=%p, %s\n", 3136 nes_debug(NES_DBG_CM, "nesvnic=%p, netdev=%p, %s\n",
3143 nesvnic, nesvnic->netdev, nesvnic->netdev->name); 3137 nesvnic, nesvnic->netdev, nesvnic->netdev->name);
3144 3138
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 199107abf195..07c400441e03 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -2999,11 +2999,8 @@ static void nes_cqp_ce_handler(struct nes_device *nesdev, struct nes_hw_cq *cq)
2999 2999
3000static u8 *locate_mpa(u8 *pkt, u32 aeq_info) 3000static u8 *locate_mpa(u8 *pkt, u32 aeq_info)
3001{ 3001{
3002 u16 pkt_len;
3003
3004 if (aeq_info & NES_AEQE_Q2_DATA_ETHERNET) { 3002 if (aeq_info & NES_AEQE_Q2_DATA_ETHERNET) {
3005 /* skip over ethernet header */ 3003 /* skip over ethernet header */
3006 pkt_len = be16_to_cpu(*(u16 *)(pkt + ETH_HLEN - 2));
3007 pkt += ETH_HLEN; 3004 pkt += ETH_HLEN;
3008 3005
3009 /* Skip over IP and TCP headers */ 3006 /* Skip over IP and TCP headers */
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index c0c404ee3bc4..1901ec789696 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -470,7 +470,6 @@ static int nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev)
470 u16 nhoffset; 470 u16 nhoffset;
471 u16 wqes_needed; 471 u16 wqes_needed;
472 u16 wqes_available; 472 u16 wqes_available;
473 u32 old_head;
474 u32 wqe_misc; 473 u32 wqe_misc;
475 474
476 /* 475 /*
@@ -510,7 +509,6 @@ sq_no_longer_full:
510 if (skb_is_gso(skb)) { 509 if (skb_is_gso(skb)) {
511 nesvnic->segmented_tso_requests++; 510 nesvnic->segmented_tso_requests++;
512 nesvnic->tso_requests++; 511 nesvnic->tso_requests++;
513 old_head = nesnic->sq_head;
514 /* Basically 4 fragments available per WQE with extended fragments */ 512 /* Basically 4 fragments available per WQE with extended fragments */
515 wqes_needed = nr_frags >> 2; 513 wqes_needed = nr_frags >> 2;
516 wqes_needed += (nr_frags&3)?1:0; 514 wqes_needed += (nr_frags&3)?1:0;
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 3638b834a1a8..9046e6675686 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -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,"
@@ -3083,7 +3081,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
3083 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;
3084 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",
3085 nesqp->iwarp_state); 3083 nesqp->iwarp_state);
3086 issue_disconnect = 1;
3087 } else { 3084 } else {
3088 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;
3089 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",