From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55232 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLil9-0002qU-2j for qemu-devel@nongnu.org; Thu, 25 Nov 2010 15:49:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLikx-0002Ko-2K for qemu-devel@nongnu.org; Thu, 25 Nov 2010 15:49:38 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:39536 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PLikw-0002KO-Fz for qemu-devel@nongnu.org; Thu, 25 Nov 2010 15:49:27 -0500 Message-ID: From: "Sebastian Herbszt" References: <1290597370-21365-1-git-send-email-hare@suse.de> <1290597370-21365-15-git-send-email-hare@suse.de> In-Reply-To: <1290597370-21365-15-git-send-email-hare@suse.de> Date: Thu, 25 Nov 2010 21:47:45 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 14/15] megasas: LSI Megaraid SAS emulation List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke , qemu-devel@nongnu.org Cc: stefanha@gmail.com, kraxel@redhat.com, nab@linux-iscsi.org Hannes Reinecke wrote: > +static int megasas_scsi_init(PCIDevice *dev) > +{ > + MPTState *s = DO_UPCAST(MPTState, dev, dev); > + uint8_t *pci_conf; > + int i; > + > + pci_conf = s->dev.config; > + > + /* PCI Vendor ID (word) */ > + pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_LSI_LOGIC); > + /* PCI device ID (word) */ > + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_LSI_SAS1078); > + /* PCI subsystem ID */ > + pci_set_word(&pci_conf[PCI_SUBSYSTEM_VENDOR_ID], 0x1000); PCI_VENDOR_ID_LSI_LOGIC > + pci_set_word(&pci_conf[PCI_SUBSYSTEM_ID], 0x1013); What is 0x1013? > + /* PCI base class code */ > + pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_RAID); > + > + /* PCI latency timer = 0 */ > + pci_conf[0x0d] = 0; PCI_LATENCY_TIMER > + /* Interrupt pin 1 */ > + pci_conf[0x3d] = 0x01; pci_config_set_interrupt_pin() Sebastian