Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-04-04 13:51:31 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-04-04 14:36:03 +0200
commit75db11526a31d00681526259eb5f0301955b005d (patch)
treeaed31d8b2d363c35b329019b005ab2f665f10b70
parentc31dfe933ba35b9e95e17d06e48fdde891bb022a (diff)
- net/smc: fix byte_order for rx_curs_confirmed (bsc#1129855
LTC#176251). - Refresh patches.fixes/net-smc-reset-cursor-update-required-flag.
-rw-r--r--patches.drivers/net-smc-fix-byte_order-for-rx_curs_confirmed77
-rw-r--r--patches.fixes/net-smc-reset-cursor-update-required-flag4
-rw-r--r--series.conf1
3 files changed, 80 insertions, 2 deletions
diff --git a/patches.drivers/net-smc-fix-byte_order-for-rx_curs_confirmed b/patches.drivers/net-smc-fix-byte_order-for-rx_curs_confirmed
new file mode 100644
index 0000000000..7f23f6f069
--- /dev/null
+++ b/patches.drivers/net-smc-fix-byte_order-for-rx_curs_confirmed
@@ -0,0 +1,77 @@
+From: Ursula Braun <ubraun@linux.ibm.com>
+Date: Thu, 7 Feb 2019 14:52:54 +0100
+Subject: net/smc: fix byte_order for rx_curs_confirmed
+Git-commit: ccc8ca9b90acb45a3309f922b2591b07b4e070ec
+Patch-mainline: v5.0-rc7
+References: bsc#1129855 LTC#176251
+
+The recent change in the rx_curs_confirmed assignment disregards
+byte order, which causes problems on little endian architectures.
+This patch fixes it.
+
+Fixes: b8649efad879 ("net/smc: fix sender_free computation") (net-tree)
+Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Petr Tesarik <ptesarik@suse.com>
+---
+ net/smc/smc_cdc.c | 4 +---
+ net/smc/smc_cdc.h | 19 ++++++++++---------
+ 2 files changed, 11 insertions(+), 12 deletions(-)
+
+diff --git a/net/smc/smc_cdc.c b/net/smc/smc_cdc.c
+index a712c9f8699b..fb07ad8d69a6 100644
+--- a/net/smc/smc_cdc.c
++++ b/net/smc/smc_cdc.c
+@@ -101,9 +101,7 @@ int smc_cdc_msg_send(struct smc_connection *conn,
+
+ conn->tx_cdc_seq++;
+ conn->local_tx_ctrl.seqno = conn->tx_cdc_seq;
+- smc_host_msg_to_cdc((struct smc_cdc_msg *)wr_buf,
+- &conn->local_tx_ctrl, conn);
+- smc_curs_copy(&cfed, &((struct smc_host_cdc_msg *)wr_buf)->cons, conn);
++ smc_host_msg_to_cdc((struct smc_cdc_msg *)wr_buf, conn, &cfed);
+ rc = smc_wr_tx_send(link, (struct smc_wr_tx_pend_priv *)pend);
+ if (!rc)
+ smc_curs_copy(&conn->rx_curs_confirmed, &cfed, conn);
+diff --git a/net/smc/smc_cdc.h b/net/smc/smc_cdc.h
+index 271e2524dc8f..f1cdde9d4b89 100644
+--- a/net/smc/smc_cdc.h
++++ b/net/smc/smc_cdc.h
+@@ -211,26 +211,27 @@ static inline int smc_curs_diff_large(unsigned int size,
+
+ static inline void smc_host_cursor_to_cdc(union smc_cdc_cursor *peer,
+ union smc_host_cursor *local,
++ union smc_host_cursor *save,
+ struct smc_connection *conn)
+ {
+- union smc_host_cursor temp;
+-
+- smc_curs_copy(&temp, local, conn);
+- peer->count = htonl(temp.count);
+- peer->wrap = htons(temp.wrap);
++ smc_curs_copy(save, local, conn);
++ peer->count = htonl(save->count);
++ peer->wrap = htons(save->wrap);
+ /* peer->reserved = htons(0); must be ensured by caller */
+ }
+
+ static inline void smc_host_msg_to_cdc(struct smc_cdc_msg *peer,
+- struct smc_host_cdc_msg *local,
+- struct smc_connection *conn)
++ struct smc_connection *conn,
++ union smc_host_cursor *save)
+ {
++ struct smc_host_cdc_msg *local = &conn->local_tx_ctrl;
++
+ peer->common.type = local->common.type;
+ peer->len = local->len;
+ peer->seqno = htons(local->seqno);
+ peer->token = htonl(local->token);
+- smc_host_cursor_to_cdc(&peer->prod, &local->prod, conn);
+- smc_host_cursor_to_cdc(&peer->cons, &local->cons, conn);
++ smc_host_cursor_to_cdc(&peer->prod, &local->prod, save, conn);
++ smc_host_cursor_to_cdc(&peer->cons, &local->cons, save, conn);
+ peer->prod_flags = local->prod_flags;
+ peer->conn_state_flags = local->conn_state_flags;
+ }
+
diff --git a/patches.fixes/net-smc-reset-cursor-update-required-flag b/patches.fixes/net-smc-reset-cursor-update-required-flag
index 52fbdcdd87..9b2918d2f0 100644
--- a/patches.fixes/net-smc-reset-cursor-update-required-flag
+++ b/patches.fixes/net-smc-reset-cursor-update-required-flag
@@ -23,8 +23,8 @@ index a712c9f8699b..99d9d6e85dfb 100644
--- a/net/smc/smc_cdc.c
+++ b/net/smc/smc_cdc.c
@@ -105,8 +105,10 @@ int smc_cdc_msg_send(struct smc_connection *conn,
- &conn->local_tx_ctrl, conn);
- smc_curs_copy(&cfed, &((struct smc_host_cdc_msg *)wr_buf)->cons, conn);
+ conn->local_tx_ctrl.seqno = conn->tx_cdc_seq;
+ smc_host_msg_to_cdc((struct smc_cdc_msg *)wr_buf, conn, &cfed);
rc = smc_wr_tx_send(link, (struct smc_wr_tx_pend_priv *)pend);
- if (!rc)
+ if (!rc) {
diff --git a/series.conf b/series.conf
index dfedbf0a8b..0eeec8c833 100644
--- a/series.conf
+++ b/series.conf
@@ -44227,6 +44227,7 @@
patches.drivers/ASoC-samsung-Prevent-clk_get_rate-calls-in-atomic-co.patch
patches.drivers/ALSA-pcm-Revert-capture-stream-behavior-change-in-bl.patch
patches.fixes/vsock-cope-with-memory-allocation-failure-at-socket-.patch
+ patches.drivers/net-smc-fix-byte_order-for-rx_curs_confirmed
patches.fixes/mac80211-call-drv_ibss_join-on-restart.patch
patches.fixes/mac80211-Fix-Tx-aggregation-session-tear-down-with-I.patch
patches.drivers/net-mlx4_en-Force-CHECKSUM_NONE-for-short-ethernet-f.patch