From 3eed3ad3297a0e51d2d4eff44340095dc2e9a538 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 5 May 2015 16:20:29 +0200 Subject: [PATCH] ahci: use MSIs on x86 - remove code for disabling MSIs Issue #1216 --- .../drivers/ahci/include/ahci_device_base.h | 2 +- repos/os/src/drivers/ahci/x86/ahci_device.h | 25 +------------------ 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/repos/os/src/drivers/ahci/include/ahci_device_base.h b/repos/os/src/drivers/ahci/include/ahci_device_base.h index a0183b5d1a..11abd3ad23 100644 --- a/repos/os/src/drivers/ahci/include/ahci_device_base.h +++ b/repos/os/src/drivers/ahci/include/ahci_device_base.h @@ -369,7 +369,7 @@ class Ahci_device_base Generic_ctrl *_ctrl; /* generic host control */ Ahci_port *_port; /* port base of device */ - Irq_connection *_irq; /* device IRQ */ + Irq_session_client *_irq; /* device IRQ */ Genode::Signal_receiver _irq_rec; /* IRQ signal receiver */ Genode::Signal_context _irq_ctx; /* IRQ signal context */ size_t _block_cnt; /* number of blocks on device */ diff --git a/repos/os/src/drivers/ahci/x86/ahci_device.h b/repos/os/src/drivers/ahci/x86/ahci_device.h index c47fd4a077..51c4020bef 100644 --- a/repos/os/src/drivers/ahci/x86/ahci_device.h +++ b/repos/os/src/drivers/ahci/x86/ahci_device.h @@ -114,26 +114,6 @@ class Ahci_device : public Ahci_device_base _identify_device(); } - static void _disable_msi(::Pci::Device_client *pci) - { - enum { PM_CAP_OFF = 0x34, MSI_CAP = 0x5, MSI_ENABLED = 0x1 }; - uint8_t cap = pci->config_read(PM_CAP_OFF, ::Pci::Device::ACCESS_8BIT); - - /* iterate through cap pointers */ - for (uint16_t val = 0; cap; cap = val >> 8) { - val = pci->config_read(cap, ::Pci::Device::ACCESS_16BIT); - - if ((val & 0xff) != MSI_CAP) - continue; - uint16_t msi = pci->config_read(cap + 2, ::Pci::Device::ACCESS_16BIT); - - if (msi & MSI_ENABLED) { - pci->config_write(cap + 2, msi ^ MSI_CAP, ::Pci::Device::ACCESS_8BIT); - PINF("Disabled MSIs %x", msi); - } - } - } - public: Ahci_device(addr_t base, Io_mem_session_capability io_cap, @@ -187,10 +167,7 @@ class Ahci_device : public Ahci_device_base PDBG("Bus address: %x:%02x.%u (0x%x)", bus, dev, func, (bus << 8) | ((dev & 0x1f) << 3) | (func & 0x7)); } - /* disable message signaled interrupts */ - _disable_msi(pci_device); - - device->_irq = new(env()->heap()) Irq_connection(intr & 0xff); + device->_irq = new(env()->heap()) Irq_session_client(pci_device->irq(0)); Genode::Signal_context_capability cap = device->_irq_rec.manage(&device->_irq_ctx); device->_irq->sigh(cap); device->_irq->ack_irq();