tests: fix cdrom_pio_impl in ide-test
commitf348daf3d5d2e349519764cd0c3ec3aaca113732
authorPeter Lieven <pl@kamp.de>
Fri, 20 Nov 2015 14:29:02 +0000 (20 15:29 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 20 Nov 2015 17:37:06 +0000 (20 17:37 +0000)
treed1687e9ad0f4c3ecdd4ad8451ebcaac745d8f0aa
parent28c3e6ee72a34d3c2c44ef508b599fa460b273bb
tests: fix cdrom_pio_impl in ide-test

The check for the cleared BSY flag has to be performed
before each data transfer and not just before the
first one.

Commit 5f81724d revealed this glitch as the BSY flag
was not set in ATAPI PIO transfers before.

While at it fix the descriptions and add a comment before
the nested for loop that transfers the data.

Signed-off-by: Peter Lieven <pl@kamp.de>
Message-id: 1448029742-19771-1-git-send-email-pl@kamp.de
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
tests/ide-test.c