qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 6/8] ahci: make number of ports runtime dete


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] Re: [PATCH 6/8] ahci: make number of ports runtime determined
Date: Tue, 18 Jan 2011 14:09:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Red Hat/3.1.7-3.el6_0 Thunderbird/3.1.7

  Hi,

diff --git a/hw/ide/ich.c b/hw/ide/ich.c
index 70cb766..f242d7a 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];

What about a qdev property instead of just hardcoding the value
somewhere else?

That particular piece of emulated hardware (ich9-ahci) actually has 6 ports. ich7 has 4 ports. A thin hardware-specific wrapper which hardcodes this stuff (and pci ids and maybe some other minor differences) looks fine to me. Maybe alex should add a ich7 variant just to prove the point ;)

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]