aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/qlxgbe
diff options
context:
space:
mode:
authorDavid C Somayajulu <davidcs@FreeBSD.org>2017-10-10 20:45:45 +0000
committerDavid C Somayajulu <davidcs@FreeBSD.org>2017-10-10 20:45:45 +0000
commit143ed053e901b8827101deec8a7342d8b574f7fe (patch)
treedb456976db62c1915c82e34dfffcb7ba81fd11f0 /sys/dev/qlxgbe
parent6e71b3c3edd15b1a66f4dccb91e545a098c3c822 (diff)
downloadsrc-143ed053e901b8827101deec8a7342d8b574f7fe.tar.gz
src-143ed053e901b8827101deec8a7342d8b574f7fe.zip
Revert Commit r324290
Add sanity checks in ql_hw_send() qla_send() to ensure that empty slots in Tx Ring map to empty slot in Tx_buf array before Transmits. If the checks fail further Transmission on that Tx Ring is prevented.
Notes
Notes: svn path=/head/; revision=324504
Diffstat (limited to 'sys/dev/qlxgbe')
-rw-r--r--sys/dev/qlxgbe/ql_hw.c10
-rw-r--r--sys/dev/qlxgbe/ql_os.c11
2 files changed, 0 insertions, 21 deletions
diff --git a/sys/dev/qlxgbe/ql_hw.c b/sys/dev/qlxgbe/ql_hw.c
index e6efba6e62af..03bb9260f3c2 100644
--- a/sys/dev/qlxgbe/ql_hw.c
+++ b/sys/dev/qlxgbe/ql_hw.c
@@ -2374,16 +2374,6 @@ ql_hw_send(qla_host_t *ha, bus_dma_segment_t *segs, int nsegs,
}
}
- for (i = 0; i < num_tx_cmds; i++) {
- if (NULL != ha->tx_ring[txr_idx].tx_buf[(tx_idx+i)].m_head) {
- QL_ASSERT(ha, 0, \
- ("%s: txr_idx = %d tx_idx = %d mbuf = %p\n",\
- __func__, txr_idx, (tx_idx+i),\
- ha->tx_ring[txr_idx].tx_buf[(tx_idx+i)].m_head));
- return (EINVAL);
- }
- }
-
tx_cmd = &hw->tx_cntxt[txr_idx].tx_ring_base[tx_idx];
if (!(mp->m_pkthdr.csum_flags & CSUM_TSO)) {
diff --git a/sys/dev/qlxgbe/ql_os.c b/sys/dev/qlxgbe/ql_os.c
index bd17252b3c4c..c4391a1b9871 100644
--- a/sys/dev/qlxgbe/ql_os.c
+++ b/sys/dev/qlxgbe/ql_os.c
@@ -1232,17 +1232,6 @@ qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx,
QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__));
tx_idx = ha->hw.tx_cntxt[txr_idx].txr_next;
-
- if (NULL != ha->tx_ring[txr_idx].tx_buf[tx_idx].m_head) {
- QL_ASSERT(ha, 0, ("%s: txr_idx = %d tx_idx = %d mbuf = %p\n",\
- __func__, txr_idx, tx_idx,\
- ha->tx_ring[txr_idx].tx_buf[tx_idx].m_head));
- if (m_head)
- m_freem(m_head);
- *m_headp = NULL;
- return (ret);
- }
-
map = ha->tx_ring[txr_idx].tx_buf[tx_idx].map;
ret = bus_dmamap_load_mbuf_sg(ha->tx_tag, map, m_head, segs, &nsegs,