]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
i40iw: Remove workaround for pre-production errata
authorHenry Orosco <henry.orosco@intel.com>
Wed, 19 Oct 2016 20:33:32 +0000 (15:33 -0500)
committerDoug Ledford <dledford@redhat.com>
Sat, 3 Dec 2016 20:24:52 +0000 (15:24 -0500)
Pre-production silicon incorrectly truncates 4 bytes of the MPA
packet in UDP loopback case. Remove the workaround as it is no
longer necessary.

Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Henry Orosco <henry.orosco@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw_cm.c
drivers/infiniband/hw/i40iw/i40iw_cm.h
drivers/infiniband/hw/i40iw/i40iw_utils.c

index 24b22e99003cc15b1fd730bc46a517e55cbe6f89..9e447b5951fcd4abdecc5c9c8927ae715fd74ac9 100644 (file)
@@ -361,15 +361,6 @@ static void i40iw_cleanup_retrans_entry(struct i40iw_cm_node *cm_node)
        spin_unlock_irqrestore(&cm_node->retrans_list_lock, flags);
 }
 
-static bool is_remote_ne020_or_chelsio(struct i40iw_cm_node *cm_node)
-{
-       if ((cm_node->rem_mac[0] == 0x0) &&
-           (((cm_node->rem_mac[1] == 0x12) && (cm_node->rem_mac[2] == 0x55)) ||
-            ((cm_node->rem_mac[1] == 0x07 && (cm_node->rem_mac[2] == 0x43)))))
-               return true;
-       return false;
-}
-
 /**
  * i40iw_form_cm_frame - get a free packet and build frame
  * @cm_node: connection's node ionfo to use in frame
@@ -410,11 +401,8 @@ static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node,
        if (hdr)
                hdr_len = hdr->size;
 
-       if (pdata) {
+       if (pdata)
                pd_len = pdata->size;
-               if (!is_remote_ne020_or_chelsio(cm_node))
-                       pd_len += MPA_ZERO_PAD_LEN;
-       }
 
        if (cm_node->vlan_id < VLAN_TAG_PRESENT)
                eth_hlen += 4;
@@ -3587,7 +3575,7 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
        iwqp->cm_node = (void *)cm_node;
        cm_node->iwqp = iwqp;
 
-       buf_len = conn_param->private_data_len + I40IW_MAX_IETF_SIZE + MPA_ZERO_PAD_LEN;
+       buf_len = conn_param->private_data_len + I40IW_MAX_IETF_SIZE;
 
        status = i40iw_allocate_dma_mem(dev->hw, &iwqp->ietf_mem, buf_len, 1);
 
@@ -3621,18 +3609,10 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
                iwqp->lsmm_mr = ibmr;
                if (iwqp->page)
                        iwqp->sc_qp.qp_uk.sq_base = kmap(iwqp->page);
-               if (is_remote_ne020_or_chelsio(cm_node))
-                       dev->iw_priv_qp_ops->qp_send_lsmm(
-                                                       &iwqp->sc_qp,
+               dev->iw_priv_qp_ops->qp_send_lsmm(&iwqp->sc_qp,
                                                        iwqp->ietf_mem.va,
                                                        (accept.size + conn_param->private_data_len),
                                                        ibmr->lkey);
-               else
-                       dev->iw_priv_qp_ops->qp_send_lsmm(
-                                                       &iwqp->sc_qp,
-                                                       iwqp->ietf_mem.va,
-                                                       (accept.size + conn_param->private_data_len + MPA_ZERO_PAD_LEN),
-                                                       ibmr->lkey);
 
        } else {
                if (iwqp->page)
index 945ed26f8dbaf18d3e9930e4f91ee598c4a95e34..24615c24cb04ad49aecdc908bd256b89cd7f9cac 100644 (file)
@@ -56,8 +56,6 @@
 
 #define I40IW_MAX_IETF_SIZE      32
 
-#define MPA_ZERO_PAD_LEN       4
-
 /* IETF RTR MSG Fields               */
 #define IETF_PEER_TO_PEER       0x8000
 #define IETF_FLPDU_ZERO_LEN     0x4000
index cd9890263cd226f64a8b822082907f8e7c80b0b8..4e880e8689ebe9b293d43bd39989e2b3b0f582d3 100644 (file)
@@ -1253,7 +1253,7 @@ enum i40iw_status_code i40iw_puda_get_tcpip_info(struct i40iw_puda_completion_in
 
        buf->totallen = pkt_len + buf->maclen;
 
-       if (info->payload_len < buf->totallen - 4) {
+       if (info->payload_len < buf->totallen) {
                i40iw_pr_err("payload_len = 0x%x totallen expected0x%x\n",
                             info->payload_len, buf->totallen);
                return I40IW_ERR_INVALID_SIZE;