]> git.baikalelectronics.ru Git - kernel.git/commit
via-cuda: Fix re-initialization of reply_ptr and reading_reply
authorFinn Thain <fthain@telegraphics.com.au>
Sun, 1 Jan 2017 00:56:26 +0000 (19:56 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 Feb 2017 05:56:20 +0000 (16:56 +1100)
commit30089c77be821ef6d0d041110ad0087f78654c4b
tree894246ad083181307bfde948e0ab41b2cc75b3da
parentbe5f2c73de2827e54681fafbce52d100aceaa644
via-cuda: Fix re-initialization of reply_ptr and reading_reply

When reading_reply is set, reply_ptr points into an adb_request struct.
Conversely, when reply_ptr instead points into the global cuda_rbuf,
reading_reply must be false.

Unfortunately, this rule can be violated because re-initialization
of reply_ptr and reading_reply presently depends on the TREQ input.

Fix this by re-initializing reply_ptr and reading_reply as soon as they
are known to be invalid.

Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/macintosh/via-cuda.c