qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 14/15] megasas: LSI Megaraid SAS emulation


From: Sebastian Herbszt
Subject: [Qemu-devel] Re: [PATCH 14/15] megasas: LSI Megaraid SAS emulation
Date: Thu, 25 Nov 2010 21:47:45 +0100

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




reply via email to

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