qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Halil Pasic <pasic@linux.vnet.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>
Cc: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,
	Pierre Morel <pmorel@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/1] s390x/css: fix cc handling for XSCH
Date: Thu, 31 Aug 2017 14:53:16 +0200	[thread overview]
Message-ID: <9df365ed-4c97-34b6-e739-360866929f5d@redhat.com> (raw)
In-Reply-To: <20170831121828.85885-1-pasic@linux.vnet.ibm.com>

On 31.08.2017 14:18, Halil Pasic wrote:
> The function ioinst_handle_xsch is presenting cc 2 when it's supposed to
> present cc 1 and the other way around, because css_do_xsch has the error
> codes mixed up. Because cc 1 has precedence over cc 2 we also have to
> swap the two checks.
> 
> Let us fix this.
> 
> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
> Reported-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
> ---
> 
> Was previously a part of a series (due to an accident the
> series had no name). This version also fixes the priority
> (aka precedence) problem.
> 
> ---
>  hw/s390x/css.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/s390x/css.c b/hw/s390x/css.c
> index 1880b1a0ff..e04e0ea3a8 100644
> --- a/hw/s390x/css.c
> +++ b/hw/s390x/css.c
> @@ -1276,16 +1276,16 @@ int css_do_xsch(SubchDev *sch)
>          goto out;
>      }
>  
> +    if (s->ctrl & SCSW_CTRL_MASK_STCTL) {
> +        ret = -EINPROGRESS;
> +        goto out;
> +    }
> +
>      if (!(s->ctrl & SCSW_CTRL_MASK_FCTL) ||
>          ((s->ctrl & SCSW_CTRL_MASK_FCTL) != SCSW_FCTL_START_FUNC) ||
>          (!(s->ctrl &
>             (SCSW_ACTL_RESUME_PEND | SCSW_ACTL_START_PEND | SCSW_ACTL_SUSP))) ||
>          (s->ctrl & SCSW_ACTL_SUBCH_ACTIVE)) {
> -        ret = -EINPROGRESS;
> -        goto out;
> -    }
> -
> -    if (s->ctrl & SCSW_CTRL_MASK_STCTL) {
>          ret = -EBUSY;
>          goto out;
>      }
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>

  reply	other threads:[~2017-08-31 12:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 12:18 [Qemu-devel] [PATCH 1/1] s390x/css: fix cc handling for XSCH Halil Pasic
2017-08-31 12:53 ` Thomas Huth [this message]
2017-08-31 13:24 ` Cornelia Huck

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=9df365ed-4c97-34b6-e739-360866929f5d@redhat.com \
    --to=thuth@redhat.com \
    --cc=bjsdjshi@linux.vnet.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=pmorel@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).