Commit 7581e96c authored by Henry Orosco's avatar Henry Orosco Committed by Doug Ledford

i40iw: Remove workaround for pre-production errata

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: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarHenry Orosco <henry.orosco@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent d62d5634
...@@ -361,15 +361,6 @@ static void i40iw_cleanup_retrans_entry(struct i40iw_cm_node *cm_node) ...@@ -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); 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 * i40iw_form_cm_frame - get a free packet and build frame
* @cm_node: connection's node ionfo to use in 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, ...@@ -410,11 +401,8 @@ static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node,
if (hdr) if (hdr)
hdr_len = hdr->size; hdr_len = hdr->size;
if (pdata) { if (pdata)
pd_len = pdata->size; 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) if (cm_node->vlan_id < VLAN_TAG_PRESENT)
eth_hlen += 4; eth_hlen += 4;
...@@ -3587,7 +3575,7 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) ...@@ -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; iwqp->cm_node = (void *)cm_node;
cm_node->iwqp = iwqp; 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); 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) ...@@ -3621,18 +3609,10 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
iwqp->lsmm_mr = ibmr; iwqp->lsmm_mr = ibmr;
if (iwqp->page) if (iwqp->page)
iwqp->sc_qp.qp_uk.sq_base = kmap(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, iwqp->ietf_mem.va,
(accept.size + conn_param->private_data_len), (accept.size + conn_param->private_data_len),
ibmr->lkey); 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 { } else {
if (iwqp->page) if (iwqp->page)
......
...@@ -56,8 +56,6 @@ ...@@ -56,8 +56,6 @@
#define I40IW_MAX_IETF_SIZE 32 #define I40IW_MAX_IETF_SIZE 32
#define MPA_ZERO_PAD_LEN 4
/* IETF RTR MSG Fields */ /* IETF RTR MSG Fields */
#define IETF_PEER_TO_PEER 0x8000 #define IETF_PEER_TO_PEER 0x8000
#define IETF_FLPDU_ZERO_LEN 0x4000 #define IETF_FLPDU_ZERO_LEN 0x4000
......
...@@ -1253,7 +1253,7 @@ enum i40iw_status_code i40iw_puda_get_tcpip_info(struct i40iw_puda_completion_in ...@@ -1253,7 +1253,7 @@ enum i40iw_status_code i40iw_puda_get_tcpip_info(struct i40iw_puda_completion_in
buf->totallen = pkt_len + buf->maclen; 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", i40iw_pr_err("payload_len = 0x%x totallen expected0x%x\n",
info->payload_len, buf->totallen); info->payload_len, buf->totallen);
return I40IW_ERR_INVALID_SIZE; return I40IW_ERR_INVALID_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment