diff options
author | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-06-10 13:23:20 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-14 13:08:15 -0500 |
commit | 22bfa16ed3d4c9d534dcfe6f2381a654f32296b9 (patch) | |
tree | 2749defa66174233fc74ad04b555c3dcc9ac64c4 /hw/i386/kvm/i8254.c | |
parent | 52bb7c6a0663b9a0ac1727f7b55811d69aaf3789 (diff) |
ide-test: fix failure for test_flush
bd07684aacfb61668ae2c25b7dd00b64f3d7c7f3 added a test to ensure BSY
flag is set when a flush request is in flight. It does this by setting
a blkdebug breakpoint on flush_to_os before issuing a CMD_FLUSH_CACHE.
It then resumes CMD_FLUSH_CACHE operation and checks that BSY is unset.
The actual unsetting of BSY does not occur until ide_flush_cb gets
called in a bh, however, so in some cases this check will race with
the actual completion.
Fix this by polling the ide status register until BSY flag gets unset
before we do our final sanity checks. According to
f68ec8379e88502b4841a110c070e9b118d3151c this is in line with how a guest
would determine whether or not the device is still busy.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/i386/kvm/i8254.c')
0 files changed, 0 insertions, 0 deletions