fsi: occ: Force sequence numbering per OCC
authorEddie James <eajames@linux.ibm.com>
Wed, 21 Jul 2021 19:02:29 +0000 (14:02 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jul 2022 15:53:32 +0000 (17:53 +0200)
commit25daf14eacd1d6bd24afd879021d2447c5254c4e
tree51807735a083f969b0cf1760afe40843b3f2a118
parent8169198652b9c02746dda463ba6311509ae27d0b
fsi: occ: Force sequence numbering per OCC

commit 62f79f3d0eb9f4c224bcc3c7f6fa758515a0a7fa upstream.

Set and increment the sequence number during the submit operation.
This prevents sequence number conflicts between different users of
the interface. A sequence number conflict may result in a user
getting an OCC response meant for a different command. Since the
sequence number is now modified, the checksum must be calculated and
set before submitting the command.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20210721190231.117185-2-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fsi/fsi-occ.c