Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1624227
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.4 15/18] net/mlx4_en: Fix bad WQE issue |
| Date | 2017-04-16 10:30 +0200 |
| Message-ID | <twNJf-1pu-9@gated-at.bofh.it> (permalink) |
| References | <twNpT-1je-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eugenia Emantayev <eugenia@mellanox.com>
commit 6496bbf0ec481966ef9ffe5b6660d8d1b55c60cc upstream.
Single send WQE in RX buffer should be stamped with software
ownership in order to prevent the flow of QP in error in FW
once UPDATE_QP is called.
Fixes: 9f519f68cfff ('mlx4_en: Not using Shared Receive Queues')
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -439,8 +439,14 @@ int mlx4_en_activate_rx_rings(struct mlx
ring->cqn = priv->rx_cq[ring_ind]->mcq.cqn;
ring->stride = stride;
- if (ring->stride <= TXBB_SIZE)
+ if (ring->stride <= TXBB_SIZE) {
+ /* Stamp first unused send wqe */
+ __be32 *ptr = (__be32 *)ring->buf;
+ __be32 stamp = cpu_to_be32(1 << STAMP_SHIFT);
+ *ptr = stamp;
+ /* Move pointer to start of rx section */
ring->buf += TXBB_SIZE;
+ }
ring->log_stride = ffs(ring->stride) - 1;
ring->buf_size = ring->size * ring->stride;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.4 00/18] 4.4.62-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:30 +0200 [PATCH 4.4 02/18] drm/i915: Stop using RP_DOWN_EI on Baytrail Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:30 +0200 [PATCH 4.4 15/18] net/mlx4_en: Fix bad WQE issue Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:30 +0200 [PATCH 4.4 17/18] net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:30 +0200 Re: [PATCH 4.4 00/18] 4.4.62-stable review Guenter Roeck <linux@roeck-us.net> - 2017-04-16 23:30 +0200 Re: [PATCH 4.4 00/18] 4.4.62-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-04-17 20:20 +0200 Re: [PATCH 4.4 00/18] 4.4.62-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-04-17 20:50 +0200
csiph-web