Received: by 10.192.165.148 with SMTP id m20csp717243imm; Wed, 2 May 2018 07:43:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZodj5Tq2AcQk8TEbsPfvzLoP/TueW0bNqmU3P5APOU1FIZUhYIW1cr7ZMU2gu0bow4+bT4+ X-Received: by 2002:a63:5f82:: with SMTP id t124-v6mr16520324pgb.150.1525272216110; Wed, 02 May 2018 07:43:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525272216; cv=none; d=google.com; s=arc-20160816; b=xnTY4u8CvFWb4jVACtx2ZU3rzSRQjFOWswuo5CIQHFL1u4S+dg3tx/4aWtEBTC5JfT 3Rd51ySWZ0ZnhuJ5gWZk76EuNcujBy1czzi8RD+tzfNpNIjMMnN0FASLCgF9e9kLdgFS EVJ/m5QRp0RkTo6SQhYZ2pbZUtJWv7MGlE7RVK7F9eme+Gcw3p8qBSD2k8WHly86K/vE ouWSv1iiQkS34kJeIS1EVsDfpVUt93Hloh8gPijIujFtjQ4UuEFpPCfdRUF8+6PyOqcT GSLwcm42OzWBxIUDr2LOvStn66oIGPSF6UlpO3JFe0+/bGRK7ChzrSJC0neCEUQANTe3 8f5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=WBFN3lVyWK8yfP1nCnQcKljrLc4N6tQr5cOecr2FG3g=; b=0tM9dF9YfLOlp0WAXvUin56ydmUOcujMCC3mB0c6kAqUdaAKlMadZfTD4+3okL3qD7 S5eI977CCJPIJNOwT7t0Mg5jjKH5o1ty7eU3Ww5HhZFLnkXwG0H/yEBXQ7qwjtvmogbG GYYECcHF0UZRE4KN77z+KIJt7sev0dt3K6VIDEES2U2EV1Np/FDdCyNYk7FRPRwPUxay y4cl8PE6VJLDFVzcAyqWF4LBQu3xXTmE54BFGfhQsu3V75VxKpywFWM+7AwtpaK5D0+O bFu27Vg7vCdnbKEb6u88E+vZ9gZbJONK556gk+flV5tZrSmNdOqCjLrjos2hr0SnmsQT Swng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 203si10263743pfa.60.2018.05.02.07.43.21; Wed, 02 May 2018 07:43:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751658AbeEBOm4 (ORCPT + 99 others); Wed, 2 May 2018 10:42:56 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:48598 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751392AbeEBOmz (ORCPT ); Wed, 2 May 2018 10:42:55 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A54148DC58; Wed, 2 May 2018 14:42:54 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F92483B61; Wed, 2 May 2018 14:42:53 +0000 (UTC) Date: Wed, 2 May 2018 16:42:51 +0200 From: Cornelia Huck To: Dong Jia Shi Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, borntraeger@de.ibm.com, bjsdjshi@linux.ibm.com, pasic@linux.ibm.com, pmorel@linux.ibm.com Subject: Re: [PATCH 1/1] vfio: ccw: fix error return in vfio_ccw_sch_event Message-ID: <20180502164251.577e2af8.cohuck@redhat.com> In-Reply-To: <20180502072559.50691-1-bjsdjshi@linux.vnet.ibm.com> References: <20180502072559.50691-1-bjsdjshi@linux.vnet.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 02 May 2018 14:42:54 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 02 May 2018 14:42:54 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'cohuck@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2 May 2018 09:25:59 +0200 Dong Jia Shi wrote: > If device has not been registered, or there is a pending work, s/a pending work/work pending/ > we should reschedule a sch_event call again. > > Signed-off-by: Dong Jia Shi Slightly off-topic question: Is the mail address with or without the 'vnet' the one to go for? > --- > drivers/s390/cio/vfio_ccw_drv.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c > index ea6a2d0b2894..770fa9cfc310 100644 > --- a/drivers/s390/cio/vfio_ccw_drv.c > +++ b/drivers/s390/cio/vfio_ccw_drv.c > @@ -177,6 +177,7 @@ static int vfio_ccw_sch_event(struct subchannel *sch, int process) > { > struct vfio_ccw_private *private = dev_get_drvdata(&sch->dev); > unsigned long flags; > + int rc = -EAGAIN; > > spin_lock_irqsave(sch->lock, flags); > if (!device_is_registered(&sch->dev)) > @@ -187,6 +188,7 @@ static int vfio_ccw_sch_event(struct subchannel *sch, int process) > > if (cio_update_schib(sch)) { > vfio_ccw_fsm_event(private, VFIO_CCW_EVENT_NOT_OPER); > + rc = 0; > goto out_unlock; > } > > @@ -195,11 +197,12 @@ static int vfio_ccw_sch_event(struct subchannel *sch, int process) > private->state = private->mdev ? VFIO_CCW_STATE_IDLE : > VFIO_CCW_STATE_STANDBY; > } > + rc = 0; > > out_unlock: > spin_unlock_irqrestore(sch->lock, flags); > > - return 0; > + return rc; > } > > static struct css_device_id vfio_ccw_sch_ids[] = { Patch looks good to me. Reviewed-by: Cornelia Huck I guess I should pick this for 4.17?