From patchwork Fri Jun 7 19:38:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 1112227 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45LCXP0yymz9s4Y; Sat, 8 Jun 2019 05:39:33 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1hZKhy-0007LB-Dj; Fri, 07 Jun 2019 19:39:26 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1hZKht-0007GI-Jr for kernel-team@lists.ubuntu.com; Fri, 07 Jun 2019 19:39:21 +0000 Received: from mail-qk1-f198.google.com ([209.85.222.198]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hZKhs-000720-50 for kernel-team@lists.ubuntu.com; Fri, 07 Jun 2019 19:39:20 +0000 Received: by mail-qk1-f198.google.com with SMTP id u129so2472602qkd.12 for ; Fri, 07 Jun 2019 12:39:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IaTKyB7xxKJf3ZJVHN/5/Ar0Uf5KEvqMMBqW0cwNoSg=; b=pDVe28wA62Y44KW0gbQkyQTky18Wyvzuixfp0tMndZFEgPL+c8VwtAwXMV6ZslvlAh FTq8VXZtdrZXvN1U69/3ljPoKXIGOEd+yZhutfWL4Uawc2Z8xU4tYsox6jciqDuduLSV rCDPkqB9QVj5sAQvnxU3ZftEe6JsrMN8qeWL8x0maM9m0a7K8jF9LhpNYEN+ubQCZHtQ gBmrRV7KVgwtEIvQZfUSyxICQzxq6GW6e8laYZQj5BX+3+AMGsq8qMpe0YpYoapN2aMg GjQh8ErJgjjSLo94XvkBJDWAN2n/dYAvfoNvEI5edE55YhDEyF7BhcE8YKcidKJdVQHx Zugw== X-Gm-Message-State: APjAAAUC0DdX5fhKdn+T8olsOrFcNbkl2K3ABNgsNKKf+Fzx8NmsBJST peV4JF6yMZEbDvBDHMH+kf6f4jfyNNyozzWlpiZcUj1sadkY6uCjys+WB/cYri1juJB6DjA+pgg +Vxwx/gLlK4E0WeerCk9MWcmnFCA6QEQLPNay0+rE X-Received: by 2002:a37:8c45:: with SMTP id o66mr20840015qkd.317.1559936358579; Fri, 07 Jun 2019 12:39:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwB6KJL0837lh3QTLWJ4H9Tk2pvo/CwRciCwXt+z3M8jXa7B06jKxSadfqzLmYyFGTz//QZuQ== X-Received: by 2002:a37:8c45:: with SMTP id o66mr20840003qkd.317.1559936358281; Fri, 07 Jun 2019 12:39:18 -0700 (PDT) Received: from gallifrey.lan ([2804:14c:4e3:4a76:b1ae:211f:e30b:4e05]) by smtp.gmail.com with ESMTPSA id r2sm1318875qtp.8.2019.06.07.12.39.16 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 07 Jun 2019 12:39:17 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [x/azure][PATCH 12/17] uio_hv_generic: make ring buffer attribute for primary channel Date: Fri, 7 Jun 2019 16:38:46 -0300 Message-Id: <20190607193851.21914-13-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190607193851.21914-1-marcelo.cerri@canonical.com> References: <20190607193851.21914-1-marcelo.cerri@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Stephen Hemminger BugLink: http://bugs.launchpad.net/bugs/1812123 The primary channel also needs a ring buffer attribute. This allows application to check if kernel supports uio sub channels, and also makes all channels use consistent API. Fixes: 37b96a4931db ("uio_hv_generic: support sub-channels") Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 9ab877a6ccf820483d79602bede0c1aa1da4d26a) Signed-off-by: Marcelo Henrique Cerri --- drivers/uio/uio_hv_generic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index ab7a60fc02e7..73ed0f201764 100644 --- a/drivers/uio/uio_hv_generic.c +++ b/drivers/uio/uio_hv_generic.c @@ -294,6 +294,11 @@ hv_uio_probe(struct hv_device *dev, vmbus_set_chn_rescind_callback(dev->channel, hv_uio_rescind); vmbus_set_sc_create_callback(dev->channel, hv_uio_new_channel); + ret = sysfs_create_bin_file(&dev->channel->kobj, &ring_buffer_bin_attr); + if (ret) + dev_notice(&dev->device, + "sysfs create ring bin file failed; %d\n", ret); + hv_set_drvdata(dev, pdata); return 0;