Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/806581/?format=api
{ "id": 806581, "url": "http://patchwork.ozlabs.org/api/patches/806581/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/1503927530-26076-2-git-send-email-sironi@amazon.de/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1503927530-26076-2-git-send-email-sironi@amazon.de>", "list_archive_url": null, "date": "2017-08-28T13:38:50", "name": "[2/2] pci: Expose offset, stride, and VF device ID via sysfs", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "b695445386f79733b9f2a5fe36a7e567b3a8c26d", "submitter": { "id": 72242, "url": "http://patchwork.ozlabs.org/api/people/72242/?format=api", "name": "Filippo Sironi", "email": "sironi@amazon.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/1503927530-26076-2-git-send-email-sironi@amazon.de/mbox/", "series": [ { "id": 171, "url": "http://patchwork.ozlabs.org/api/series/171/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=171", "date": "2017-08-28T13:38:50", "name": "[1/2] pci: Cache the VF device ID in the SR-IOV structure", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/171/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/806581/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/806581/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-pci-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-pci-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=amazon.de header.i=@amazon.de\n\theader.b=\"ju56gevQ\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xgtDG1D8Sz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 28 Aug 2017 23:39:42 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751348AbdH1Njk (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tMon, 28 Aug 2017 09:39:40 -0400", "from smtp-fw-2101.amazon.com ([72.21.196.25]:22980 \"EHLO\n\tsmtp-fw-2101.amazon.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751337AbdH1Njj (ORCPT\n\t<rfc822; linux-pci@vger.kernel.org>); Mon, 28 Aug 2017 09:39:39 -0400", "from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO\n\temail-inbound-relay-2c-1968f9fa.us-west-2.amazon.com) ([10.43.8.6])\n\tby smtp-border-fw-out-2101.iad2.amazon.com with\n\tESMTP/TLS/DHE-RSA-AES256-SHA; 28 Aug 2017 13:39:19 +0000", "from uf8b156e456a5587c9af4.ant.amazon.com\n\t(pdx2-ws-svc-lb17-vlan2.amazon.com [10.247.140.66])\n\tby email-inbound-relay-2c-1968f9fa.us-west-2.amazon.com\n\t(8.14.7/8.14.7) with ESMTP id v7SDd86i034309\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);\n\tMon, 28 Aug 2017 13:39:09 GMT", "from uf8b156e456a5587c9af4.ant.amazon.com (localhost [127.0.0.1])\n\tby uf8b156e456a5587c9af4.ant.amazon.com (8.15.2/8.15.2/Debian-3)\n\twith ESMTP id v7SDd8bd026143; Mon, 28 Aug 2017 15:39:08 +0200", "(from sironi@localhost)\n\tby uf8b156e456a5587c9af4.ant.amazon.com (8.15.2/8.15.2/Submit) id\n\tv7SDd7l0026142; Mon, 28 Aug 2017 15:39:07 +0200" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209;\n\tt=1503927579; x=1535463579;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=aszEu8g0CAsTZ/pw2NyXNbpiydcS6t/XIguXU4PIcXY=;\n\tb=ju56gevQAvWrw0/fYBnmKM4LZYvChbdgoh0vFolZDwW0Lzj9uhtfGW7m\n\tVdGKMYVeAheOc1ORmR+9Grt0daAETcU9cJRWik8tnmIuqKvOnuFq4kNRF\n\ta8VmBjAreYqepLcfRsF0cStlE4h9aOsMiapWNEIUCIqMo6yUybEl5qW2h o=;", "X-IronPort-AV": "E=Sophos;i=\"5.41,441,1498521600\"; d=\"scan'208\";a=\"658277148\"", "From": "Filippo Sironi <sironi@amazon.de>", "To": "linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org", "Cc": "Filippo Sironi <sironi@amazon.de>", "Subject": "[PATCH 2/2] pci: Expose offset, stride, and VF device ID via sysfs", "Date": "Mon, 28 Aug 2017 15:38:50 +0200", "Message-Id": "<1503927530-26076-2-git-send-email-sironi@amazon.de>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1503927530-26076-1-git-send-email-sironi@amazon.de>", "References": "<1503927530-26076-1-git-send-email-sironi@amazon.de>", "Sender": "linux-pci-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-pci.vger.kernel.org>", "X-Mailing-List": "linux-pci@vger.kernel.org" }, "content": "... to make it easier for userspace applications consumption.\n\nSigned-off-by: Filippo Sironi <sironi@amazon.de>\nCc: linux-pci@vger.kernel.org\nCc: linux-kernel@vger.kernel.org\n---\n drivers/pci/pci-sysfs.c | 33 +++++++++++++++++++++++++++++++++\n 1 file changed, 33 insertions(+)", "diff": "diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c\nindex 2f3780b50723..f920afe7cff3 100644\n--- a/drivers/pci/pci-sysfs.c\n+++ b/drivers/pci/pci-sysfs.c\n@@ -648,6 +648,33 @@ static ssize_t sriov_numvfs_store(struct device *dev,\n \treturn count;\n }\n \n+static ssize_t sriov_offset_show(struct device *dev,\n+\t\t\t\t struct device_attribute *attr,\n+\t\t\t\t char *buf)\n+{\n+\tstruct pci_dev *pdev = to_pci_dev(dev);\n+\n+\treturn sprintf(buf, \"%u\\n\", pdev->sriov->offset);\n+}\n+\n+static ssize_t sriov_stride_show(struct device *dev,\n+\t\t\t\t struct device_attribute *attr,\n+\t\t\t\t char *buf)\n+{\n+\tstruct pci_dev *pdev = to_pci_dev(dev);\n+\n+\treturn sprintf(buf, \"%u\\n\", pdev->sriov->stride);\n+}\n+\n+static ssize_t sriov_vf_did_show(struct device *dev,\n+\t\t\t\t struct device_attribute *attr,\n+\t\t\t\t char *buf)\n+{\n+\tstruct pci_dev *pdev = to_pci_dev(dev);\n+\n+\treturn sprintf(buf, \"%x\\n\", pdev->sriov->vf_did);\n+}\n+\n static ssize_t sriov_drivers_autoprobe_show(struct device *dev,\n \t\t\t\t\t struct device_attribute *attr,\n \t\t\t\t\t char *buf)\n@@ -676,6 +703,9 @@ static struct device_attribute sriov_totalvfs_attr = __ATTR_RO(sriov_totalvfs);\n static struct device_attribute sriov_numvfs_attr =\n \t\t__ATTR(sriov_numvfs, (S_IRUGO|S_IWUSR|S_IWGRP),\n \t\t sriov_numvfs_show, sriov_numvfs_store);\n+static struct device_attribute sriov_offset_attr = __ATTR_RO(sriov_offset);\n+static struct device_attribute sriov_stride_attr = __ATTR_RO(sriov_stride);\n+static struct device_attribute sriov_vf_did_attr = __ATTR_RO(sriov_vf_did);\n static struct device_attribute sriov_drivers_autoprobe_attr =\n \t\t__ATTR(sriov_drivers_autoprobe, (S_IRUGO|S_IWUSR|S_IWGRP),\n \t\t sriov_drivers_autoprobe_show, sriov_drivers_autoprobe_store);\n@@ -1744,6 +1774,9 @@ static struct attribute_group pci_dev_hp_attr_group = {\n static struct attribute *sriov_dev_attrs[] = {\n \t&sriov_totalvfs_attr.attr,\n \t&sriov_numvfs_attr.attr,\n+\t&sriov_offset_attr.attr,\n+\t&sriov_stride_attr.attr,\n+\t&sriov_vf_did_attr.attr,\n \t&sriov_drivers_autoprobe_attr.attr,\n \tNULL,\n };\n", "prefixes": [ "2/2" ] }