MLK-14930-1 cmd: sata: Fix sata init and stop issue
authorYe Li <ye.li@nxp.com>
Tue, 27 Mar 2018 07:56:19 +0000 (00:56 -0700)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 05:03:37 +0000 (22:03 -0700)
commita52efe725cc4c2a032660965f7aeabb1aec1f61d
tree389c5a96fa93139fd83a5c733d70dc959a9b7888
parent6a5ec2ded0be70c8ae5caf380dd7e01874606ff8
MLK-14930-1 cmd: sata: Fix sata init and stop issue

When sata stop is executed, the sata_curr_device is not reset to -1, so
any following sata commands will not initialize the sata again and cause
problem.

Additional, in sata init implementation, the sata_curr_device should be updated,
otherwise sata will be initialized again when doing other sata commands like
read/write/info/part/device.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9bccfd01c618a5d059f332c000c42e5bf39880d9)
(cherry picked from commit f162bbb14b5c9b0c4073eee5ceeea6a9d1780394)
(cherry picked from commit 1707f011d5c79ae0f32b50ecf87f8aaed94944d0)
cmd/sata.c