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>
Fri, 24 May 2019 11:28:28 +0000 (04:28 -0700)
commitf162bbb14b5c9b0c4073eee5ceeea6a9d1780394
treeef07e57c6f22ec1fafa0753469df12ee6f0b85e5
parent7980dc9700bdeb610cfa91b4b53abe450c688b9b
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)
cmd/sata.c