MLK-14930-1 cmd: sata: Fix sata init and stop issue
authorYe Li <ye.li@nxp.com>
Wed, 24 May 2017 07:12:04 +0000 (02:12 -0500)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:36:51 +0000 (02:36 +0800)
commit4045d108ca8b190811dd2e8f8e3596fd0ee4153e
tree69da0a66eb0cfc24704f6d6eea7e95f7af70d89e
parent3cba1c7d6224d434b75cb8351efbf0f760fb8c68
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>
cmd/sata.c