mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
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>
This commit is contained in:
parent
760c3e44d3
commit
2c4b9d0ea4
3 changed files with 26 additions and 16 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue