ide: make ide_transfer_stop idempotent
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Jun 2018 19:09:53 +0000 (15:09 -0400)
committerJohn Snow <jsnow@redhat.com>
Fri, 8 Jun 2018 17:36:31 +0000 (13:36 -0400)
commit882941a5680db4d3e247a089126be23181ae13fd
treeecfb9150a19b97e19c904ad5d992803385e71092
parentee4cd662addd2ef51c5bc33e57f7fc6cdee830a0
ide: make ide_transfer_stop idempotent

There is code checking s->end_transfer_func and it was not taught about
ide_transfer_cancel.  We can just use ide_transfer_stop because
s->end_transfer_func is only ever called in the DRQ phase.

ide_transfer_cancel can then be removed, since it would just be
calling ide_transfer_halt.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180606190955.20845-6-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
hw/ide/core.c