提交 42af312a 编写于 作者: J John Snow

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: NJohn Snow <jsnow@redhat.com>
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: NJeff Cody <jcody@redhat.com>
Message-id: 20180531004323.4611-4-jsnow@redhat.com
Signed-off-by: NJohn Snow <jsnow@redhat.com>
上级 5694c7ea
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册