From 73de12999de55e3112873ceabf4bdcb79cd0572e Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 5 Jan 2016 15:32:15 +0100 Subject: [PATCH] ahci: fix ready status handling of ahci ports Fixes #1875 --- repos/os/src/drivers/ahci/ahci.cc | 5 +++-- repos/os/src/drivers/ahci/ata_driver.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/repos/os/src/drivers/ahci/ahci.cc b/repos/os/src/drivers/ahci/ahci.cc index 32e2fe5ab7..191696c3c2 100644 --- a/repos/os/src/drivers/ahci/ahci.cc +++ b/repos/os/src/drivers/ahci/ahci.cc @@ -96,9 +96,10 @@ struct Ahci platform_hba.ack_irq(); } - void ready(unsigned) + void ready(unsigned cnt) { - if (--ready_count) + ready_count -= cnt; + if (ready_count) return; /* announce service */ diff --git a/repos/os/src/drivers/ahci/ata_driver.h b/repos/os/src/drivers/ahci/ata_driver.h index fff3bb4a76..6a042f7970 100644 --- a/repos/os/src/drivers/ahci/ata_driver.h +++ b/repos/os/src/drivers/ahci/ata_driver.h @@ -251,6 +251,7 @@ struct Ata_driver : Port_driver else io_cmd = new (Genode::env()->heap()) Dma_ext_command(); + ack_irq(); } break;