diff options
author | John Snow <jsnow@redhat.com> | 2018-06-08 13:17:36 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2018-06-08 13:17:36 -0400 |
commit | 42af312adef8afdae11d5f83d12a404b178dbda4 (patch) | |
tree | eb0c073e8d3039a9c5c683a4343232e4c98909c5 /hw | |
parent | 5694c7eacce6b263ad7497cc1bb76aad746cfd4e (diff) | |
download | qemu-42af312adef8afdae11d5f83d12a404b178dbda4.zip qemu-42af312adef8afdae11d5f83d12a404b178dbda4.tar.gz qemu-42af312adef8afdae11d5f83d12a404b178dbda4.tar.bz2 |
ahci: don't schedule unnecessary BH
The comment gives us a hint. *Maybe* we still have something to
process. Well, why not check?
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Message-id: 20180531004323.4611-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ide/ahci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index b11640d..ac4bc17 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1427,8 +1427,7 @@ static void ahci_cmd_done(IDEDMA *dma) /* update d2h status */ ahci_write_fis_d2h(ad); - if (!ad->check_bh) { - /* maybe we still have something to process, check later */ + if (ad->port_regs.cmd_issue && !ad->check_bh) { ad->check_bh = qemu_bh_new(ahci_check_cmd_bh, ad); qemu_bh_schedule(ad->check_bh); } |