]> git.baikalelectronics.ru Git - kernel.git/commit
mctp: serial: Fix starting value for frame check sequence
authorJeremy Kerr <jk@codeconstruct.com.au>
Fri, 16 Dec 2022 03:44:09 +0000 (11:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:56 +0000 (13:32 +0100)
commit2d0ffcc0d48223fa95ed413f999507dd6f977ab0
tree5c58d6b8f2bedc9bcbbb7e4824ca2442339948c5
parentf4e14d7f45c7bcab5e5ec0a6829d7dfdbafb2a5c
mctp: serial: Fix starting value for frame check sequence

[ Upstream commit 2856a62762c8409e360d4fd452194c8e57ba1058 ]

RFC1662 defines the start state for the crc16 FCS to be 0xffff, but
we're currently starting at zero.

This change uses the correct start state. We're only early in the
adoption for the serial binding, so there aren't yet any other users to
interface to.

Fixes: d54cb6e7e634 ("mctp: Add MCTP-over-serial transport binding")
Reported-by: Harsh Tyagi <harshtya@google.com>
Tested-by: Harsh Tyagi <harshtya@google.com>
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/mctp/mctp-serial.c