]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: set rx_off for SMCR explicitly
authorUrsula Braun <ubraun@linux.ibm.com>
Thu, 3 Sep 2020 19:53:16 +0000 (21:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Sep 2020 23:52:33 +0000 (16:52 -0700)
commitc6eb5d2d17a3da6b512042a26c8268f2bc858fd7
tree73704a752703f35af142d29ceb8ee4d499216860
parentd98210e4316ac6de389c9988ac40e428a74d1c3a
net/smc: set rx_off for SMCR explicitly

SMC tries to make use of SMCD first. If a problem shows up,
it tries to switch to SMCR. If the SMCD initializing problem shows
up after the SMCD connection has already been initialized, field
rx_off keeps the wrong SMCD value for SMCR, which results in corrupted
data at the receiver.
This patch adds an explicit (re-)setting of field rx_off to zero if the
connection uses SMCR.

Fixes: 731b704e3a23 ("net/smc: add SMC-D support in data transfer")
Reviewed-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_core.c