From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8PaB-0002jq-1m for qemu-devel@nongnu.org; Thu, 02 Jun 2016 06:10:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8Pa6-0003qS-Mq for qemu-devel@nongnu.org; Thu, 02 Jun 2016 06:10:30 -0400 Received: from [59.151.112.132] (port=60479 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Pa5-0003pb-VQ for qemu-devel@nongnu.org; Thu, 02 Jun 2016 06:10:26 -0400 References: <1464062689-32156-1-git-send-email-caoj.fnst@cn.fujitsu.com> <1464062689-32156-10-git-send-email-caoj.fnst@cn.fujitsu.com> <87shwxz2wd.fsf@dusky.pond.sub.org> From: Cao jin Message-ID: <5750073E.2090009@cn.fujitsu.com> Date: Thu, 2 Jun 2016 18:15:26 +0800 MIME-Version: 1.0 In-Reply-To: <87shwxz2wd.fsf@dusky.pond.sub.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 09/11] megasas: change msi/msix property type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Marcel Apfelbaum , Paolo Bonzini , Hannes Reinecke , "Michael S. Tsirkin" 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