qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/10] ide: add support for ide extenders


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 03/10] ide: add support for ide extenders
Date: Wed, 17 Nov 2010 09:57:36 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100827 Red Hat/3.1.3-1.el6 Thunderbird/3.1.3

  Hi,

+/* This struct represents a device that uses an IDE bus, but requires
+ * modifications to how it works. An example is AHCI. */
+struct IDEExtender {
+    TransferStartFunc *transfer_start_fn;
+    IRQSetFunc *irq_set_fn;
+    DMAStartFunc *dma_start_fn;
+};

Hmm, I'd call that IDEBusOps or simliar.

  struct IDEBus {
      BusState qbus;
      IDEDevice *master;
      IDEDevice *slave;
      BMDMAState *bmdma;
      IDEState ifs[2];
+    IDEExtender extender;
        IDEBusOps *ops;

Note this is a pointer now, so you can have static IDEBusOps structs and just set the ops pointer instead of filling in three function pointers.

cheers,
  Gerd



reply via email to

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