qemu-devel
[Top][All Lists]
Advanced

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

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


From: Hannes Reinecke
Subject: Re: [Qemu-devel] Re: [PATCH 14/15] megasas: LSI Megaraid SAS emulation
Date: Tue, 21 Dec 2010 13:06:34 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101026 SUSE/3.0.10 Thunderbird/3.0.10

On 11/25/2010 09:47 PM, Sebastian Herbszt wrote:
> 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
> 
Ok.

>> +    pci_set_word(&pci_conf[PCI_SUBSYSTEM_ID], 0x1013);
> 
> What is 0x1013?
> 
That's the device ID for Megaraid SAS 8708EM2.
I'll be adding a #define for it.

>> +    /* 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
> 
Ok.
>> +    /* Interrupt pin 1 */
>> +    pci_conf[0x3d] = 0x01;
> 
> pci_config_set_interrupt_pin()
> 
Ok.

Fixed in my megasas git tree. Will be included in the next
round of patches.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                   zSeries & Storage
address@hidden                        +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)



reply via email to

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