All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Cao jin <caoj.fnst@cn.fujitsu.com>
Cc: qemu-devel@nongnu.org, Marcel Apfelbaum <marcel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v6 08/11] mptsas: change msi property type
Date: Wed, 01 Jun 2016 10:43:47 +0200	[thread overview]
Message-ID: <877fe91epo.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1464062689-32156-9-git-send-email-caoj.fnst@cn.fujitsu.com> (Cao jin's message of "Tue, 24 May 2016 12:04:46 +0800")

Cao jin <caoj.fnst@cn.fujitsu.com> writes:

>>From uint32 to enum OnOffAuto, and give it a shorter name.
>
> cc: Paolo Bonzini <pbonzini@redhat.com>
> cc: Michael S. Tsirkin <mst@redhat.com>
> cc: Markus Armbruster <armbru@redhat.com>
> cc: Marcel Apfelbaum <marcel@redhat.com>
>
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
> ---
>  hw/scsi/mptsas.c | 4 ++--
>  hw/scsi/mptsas.h | 3 ++-
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
> index 1c18c84..afee576 100644
> --- a/hw/scsi/mptsas.c
> +++ b/hw/scsi/mptsas.c
> @@ -1285,7 +1285,7 @@ static void mptsas_scsi_realize(PCIDevice *dev, Error **errp)
>      memory_region_init_io(&s->diag_io, OBJECT(s), &mptsas_diag_ops, s,
>                            "mptsas-diag", 0x10000);
>  
> -    if (s->msi_available &&
> +    if ((s->msi == ON_OFF_AUTO_AUTO || s->msi == ON_OFF_AUTO_ON) &&
>          msi_init(dev, 0, 1, true, false) >= 0) {
>          s->msi_in_use = true;
>      }

Same suggestions as for PATCH 06:

* Use the s->msi != ON_OFF_AUTO_OFF
* Add /* TODO check for errors */ now, drop it when you add the check in
  PATCH 11.

> @@ -1404,7 +1404,7 @@ static const VMStateDescription vmstate_mptsas = {
>  static Property mptsas_properties[] = {
>      DEFINE_PROP_UINT64("sas_address", MPTSASState, sas_addr, 0),
>      /* TODO: test MSI support under Windows */
> -    DEFINE_PROP_BIT("msi", MPTSASState, msi_available, 0, true),
> +    DEFINE_PROP_ON_OFF_AUTO("msi", MPTSASState, msi, ON_OFF_AUTO_AUTO),
>      DEFINE_PROP_END_OF_LIST(),
>  };
>  
> diff --git a/hw/scsi/mptsas.h b/hw/scsi/mptsas.h
> index 595f81f..0436a33 100644
> --- a/hw/scsi/mptsas.h
> +++ b/hw/scsi/mptsas.h
> @@ -27,7 +27,8 @@ struct MPTSASState {
>      MemoryRegion diag_io;
>      QEMUBH *request_bh;
>  
> -    uint32_t msi_available;
> +    /* properties */
> +    OnOffAuto msi;
>      uint64_t sas_addr;
>  
>      bool msi_in_use;

  reply	other threads:[~2016-06-01  8:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24  4:04 [Qemu-devel] [PATCH v6 00/11] Add param Error ** for msi_init() Cao jin
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 01/11] pci core: assert ENOSPC when add capability Cao jin
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 02/11] fix some coding style problems Cao jin
2016-06-01  8:09   ` Markus Armbruster
2016-06-01  8:33     ` Cao jin
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 03/11] change pvscsi_init_msi() type to void Cao jin
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 04/11] megasas: Fix Cao jin
2016-06-01  8:10   ` Markus Armbruster
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 05/11] mptsas: change .realize function name Cao jin
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 06/11] usb xhci: change msi/msix property type Cao jin
2016-06-01  8:25   ` Markus Armbruster
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 07/11] intel-hda: change msi " Cao jin
2016-06-01  8:39   ` Markus Armbruster
2016-06-02  8:42     ` Cao jin
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 08/11] mptsas: " Cao jin
2016-06-01  8:43   ` Markus Armbruster [this message]
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 09/11] megasas: change msi/msix " Cao jin
2016-06-01  9:14   ` Markus Armbruster
2016-06-02 10:15     ` Cao jin
2016-06-02 13:59       ` Markus Armbruster
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 10/11] pci bridge dev: change msi " Cao jin
2016-06-01  9:17   ` Markus Armbruster
2016-05-24  4:04 ` [Qemu-devel] [PATCH v6 11/11] pci: Convert msi_init() to Error and fix callers to check it Cao jin
2016-06-01 12:37   ` Markus Armbruster
2016-06-03  8:28     ` Cao jin
2016-06-03 11:30       ` Markus Armbruster
2016-06-01  3:06 ` [Qemu-devel] [PATCH v6 00/11] Add param Error ** for msi_init() Cao jin
2016-06-01  6:59 ` Cao jin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fe91epo.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.