diff options
author | Alexander Graf <agraf@suse.de> | 2011-02-01 15:51:31 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-02-07 11:40:31 +0100 |
commit | 2c4b9d0ea42c27ec2112e437a0fa954afe73bd23 (patch) | |
tree | a89f670d2938ba00365e2a8a5a0b3ac5707e2cc1 /hw/ide/ich.c | |
parent | 760c3e44d3a1d8a7e9d22f0429b1805d1c688178 (diff) |
ahci: make number of ports runtime determined
Different AHCI controllers have a different number of ports, so the core
shouldn't care about the amount of ports available.
This patch makes the number of ports available to the AHCI core runtime
configurable, allowing us to have multiple different AHCI implementations
with different amounts of ports.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/ich.c')
-rw-r--r-- | hw/ide/ich.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 70cb76699..f242d7a81 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -100,7 +100,7 @@ static int pci_ich9_ahci_init(PCIDevice *dev) msi_init(dev, 0x50, 1, true, false); - ahci_init(&d->ahci, &dev->qdev); + ahci_init(&d->ahci, &dev->qdev, 6); d->ahci.irq = d->card.irq[0]; return 0; @@ -116,6 +116,7 @@ static int pci_ich9_uninit(PCIDevice *dev) } qemu_unregister_reset(ahci_reset, d); + ahci_uninit(&d->ahci); return 0; } |