From patchwork Tue Apr 28 18:23:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 226725 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21CD9C83008 for ; Tue, 28 Apr 2020 19:01:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0344120575 for ; Tue, 28 Apr 2020 19:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588100469; bh=x+3uj04gfbt089WFQK1mEWtg4dmCnvjijoKeHZ4uEF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VSeXrLd2WoacS1D8K4+SmEwIreUvPUhx5+6AHtB3akaNwkEdYdRZWlPEIM7Rh08Mx fnxdFKEMxlyU4uSipGgPwU1EJaCNrlvKvVq2PjqAAp9PqUiHOIycFlMmoi3cLoT5JM cmr2wns8MDwzD6MkTy1xDhPWlUyjJ7+hY+HP6lgU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729208AbgD1TBA (ORCPT ); Tue, 28 Apr 2020 15:01:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:38540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728823AbgD1S0r (ORCPT ); Tue, 28 Apr 2020 14:26:47 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B609C20B80; Tue, 28 Apr 2020 18:26:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588098407; bh=x+3uj04gfbt089WFQK1mEWtg4dmCnvjijoKeHZ4uEF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MsWp0hCqAxXCw1bsQtxak04G5NC3IT9YUo1Mxg3Uho3jCTLtMSdXD6PxoTyu0k+Ef VgILxd9H3lB0ghuT5gHF3h6WRmoOChhXuqQ/Yu7LVCQa8/bVLLQL7zc7IaVHoj1CKB /mP+aDmsf17KTFG77LzTnuw3rUa1QHMGrxp29Cd4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Farman , Cornelia Huck , Vasily Gorbik , Sasha Levin Subject: [PATCH 5.6 027/167] s390/cio: generate delayed uevent for vfio-ccw subchannels Date: Tue, 28 Apr 2020 20:23:23 +0200 Message-Id: <20200428182228.628059238@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200428182225.451225420@linuxfoundation.org> References: <20200428182225.451225420@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Cornelia Huck [ Upstream commit 2bc55eaeb88d30accfc1b6ac2708d4e4b81ca260 ] The common I/O layer delays the ADD uevent for subchannels and delegates generating this uevent to the individual subchannel drivers. The vfio-ccw I/O subchannel driver, however, did not do that, and will not generate an ADD uevent for subchannels that had not been bound to a different driver (or none at all, which also triggers the uevent). Generate the ADD uevent at the end of the probe function if uevents were still suppressed for the device. Message-Id: <20200327124503.9794-3-cohuck@redhat.com> Fixes: 63f1934d562d ("vfio: ccw: basic implementation for vfio_ccw driver") Reviewed-by: Eric Farman Signed-off-by: Cornelia Huck Signed-off-by: Vasily Gorbik Signed-off-by: Sasha Levin --- drivers/s390/cio/vfio_ccw_drv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c index e401a3d0aa570..339a6bc0339b0 100644 --- a/drivers/s390/cio/vfio_ccw_drv.c +++ b/drivers/s390/cio/vfio_ccw_drv.c @@ -167,6 +167,11 @@ static int vfio_ccw_sch_probe(struct subchannel *sch) if (ret) goto out_disable; + if (dev_get_uevent_suppress(&sch->dev)) { + dev_set_uevent_suppress(&sch->dev, 0); + kobject_uevent(&sch->dev.kobj, KOBJ_ADD); + } + VFIO_CCW_MSG_EVENT(4, "bound to subchannel %x.%x.%04x\n", sch->schid.cssid, sch->schid.ssid, sch->schid.sch_no);