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?
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?
--
Yours Sincerely,
Cao jin