summaryrefslogtreecommitdiffstats
path: root/net/smc
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2020-10-14 19:43:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-29 09:54:55 +0100
commit0cca96df3732fef913c0f7c48f7118a90db466da (patch)
treead11c6a5485b76e94f5aa3b2d168297def650ec3 /net/smc
parent6b00f0321c69e28228cc3024724c679463b4e863 (diff)
downloadlinux-stable-0cca96df3732fef913c0f7c48f7118a90db466da.tar.gz
linux-stable-0cca96df3732fef913c0f7c48f7118a90db466da.tar.bz2
linux-stable-0cca96df3732fef913c0f7c48f7118a90db466da.zip
net/smc: fix valid DMBE buffer sizes
[ Upstream commit ef12ad45880b696eb993d86c481ca891836ab593 ] The SMCD_DMBE_SIZES should include all valid DMBE buffer sizes, so the correct value is 6 which means 1MB. With 7 the registration of an ISM buffer would always fail because of the invalid size requested. Fix that and set the value to 6. Fixes: c6ba7c9ba43d ("net/smc: add base infrastructure for SMC-D and ISM") Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/smc')
-rw-r--r--net/smc/smc_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
index 2c9baf8bf118..e7a6c8dcf6b8 100644
--- a/net/smc/smc_core.c
+++ b/net/smc/smc_core.c
@@ -770,7 +770,7 @@ static struct smc_buf_desc *smcr_new_buf_create(struct smc_link_group *lgr,
return buf_desc;
}
-#define SMCD_DMBE_SIZES 7 /* 0 -> 16KB, 1 -> 32KB, .. 6 -> 1MB */
+#define SMCD_DMBE_SIZES 6 /* 0 -> 16KB, 1 -> 32KB, .. 6 -> 1MB */
static struct smc_buf_desc *smcd_new_buf_create(struct smc_link_group *lgr,
bool is_dmb, int bufsize)