[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 09/11] megasas: change msi/msix property type
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v6 09/11] megasas: change msi/msix property type |
Date: |
Thu, 02 Jun 2016 15:59:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Cao jin <address@hidden> writes:
> On 06/01/2016 05:14 PM, Markus Armbruster wrote:
>
>>>
>>> static bool megasas_use_msix(MegasasState *s)
>>> {
>>> - return s->flags & MEGASAS_MASK_USE_MSIX;
>>> + return s->msix == ON_OFF_AUTO_AUTO || s->msix == ON_OFF_AUTO_ON;
>>
>> s->msi != ON_OFF_AUTO_OFF, please.
>>
>>> }
>>
>> Same correctness argument as for megasas_mask_use_msi().
>>
>
> Hi Markus,
> I Cant find function names megasas_mask_use_msi, only macro that I
> deleted. Don`t quite follow the meaning, do I need to do anything
> about it?
I meant megasas_use_msi(). Sorry for sowing confusion again :)
>
>>>
>>> static bool megasas_is_jbod(MegasasState *s)
>>> @@ -2349,12 +2347,12 @@ static void megasas_scsi_realize(PCIDevice *dev,
>>> Error **errp)
>>>
>>> if (megasas_use_msi(s) &&
>>> msi_init(dev, 0x50, 1, true, false) < 0) {
>>> - s->flags &= ~MEGASAS_MASK_USE_MSI;
>>> + s->msi = ON_OFF_AUTO_OFF;
>>> }
>>> if (megasas_use_msix(s) &&
>>> msix_init(dev, 15, &s->mmio_io, b->mmio_bar, 0x2000,
>>> &s->mmio_io, b->mmio_bar, 0x3800, 0x68)) {
>>> - s->flags &= ~MEGASAS_MASK_USE_MSIX;
>>> + s->msix = ON_OFF_AUTO_OFF;
>>> }
>>> if (pci_is_express(dev)) {
>>> pcie_endpoint_cap_init(dev, 0xa0);
>>
>> Unlike the device models we've seen in earlier patches, this one
>> overwrites its configuration to reflect actual device state. Hmm. I'll
>> revisit this in my review of PATCH 11.
>>
>
> I guess it is still OK?
This patch is okay. I was just observing that this device is different.