From patchwork Thu Feb 4 15:08:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelly Zytaruk X-Patchwork-Id: 8224361 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2D6879F1C0 for ; Thu, 4 Feb 2016 15:24:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6258220398 for ; Thu, 4 Feb 2016 15:24:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7362320383 for ; Thu, 4 Feb 2016 15:23:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966035AbcBDPX6 (ORCPT ); Thu, 4 Feb 2016 10:23:58 -0500 Received: from mail-by2on0084.outbound.protection.outlook.com ([207.46.100.84]:19632 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965589AbcBDPX5 convert rfc822-to-8bit (ORCPT ); Thu, 4 Feb 2016 10:23:57 -0500 X-Greylist: delayed 905 seconds by postgrey-1.27 at vger.kernel.org; Thu, 04 Feb 2016 10:23:57 EST Received: from CY1PR12MB0262.namprd12.prod.outlook.com (10.161.174.153) by CY1PR12MB0264.namprd12.prod.outlook.com (10.161.174.155) with Microsoft SMTP Server (TLS) id 15.1.396.15; Thu, 4 Feb 2016 15:08:50 +0000 Received: from CY1PR12MB0262.namprd12.prod.outlook.com ([10.161.174.153]) by CY1PR12MB0262.namprd12.prod.outlook.com ([10.161.174.153]) with mapi id 15.01.0396.020; Thu, 4 Feb 2016 15:08:50 +0000 From: "Zytaruk, Kelly" To: Bjorn Helgaas , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "Zytaruk, Kelly" Subject: [PATCH] PCI: Support SRIOV on Legacy EndPoint device Thread-Topic: [PATCH] PCI: Support SRIOV on Legacy EndPoint device Thread-Index: AdFfXdN3Z+c8yDASSaqzjYvZ3cR91g== Date: Thu, 4 Feb 2016 15:08:50 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: google.com; dkim=none (message not signed) header.d=none; google.com; dmarc=none action=none header.from=amd.com; x-originating-ip: [165.204.55.251] x-ms-office365-filtering-correlation-id: efac6810-d861-4ab0-c0b1-08d32d7516fe x-microsoft-exchange-diagnostics: 1; CY1PR12MB0264; 5:YlRDC/hot0BmyI8Ll0wrKI6FOgoksPIFrEW9WQhcPz47Lb7ZsCkS//dT4lq+sJn8vRbTAjfAI/hJTNl9PwpGVyxQFLKIUvXW2gAWQTb/bW5KpgNZVIhOA/Sh+SGn9CB6tgixS+htF8nYIp5mdcTFSA==; 24:tEm1CGrJAdJ5VAxc1kKrvk129pqjkRx9KUonFPy5XYBZ9OvNV51GNeAgHl/Cq/Uk9HZmffyQtHiYQJ1SumeT7WJG00EzW8cjjSFg3g1jvSk=; 20:rclXDTG+vWTZxGsSv1SEI1CNK8GkqkVm2D4azs7dIPvPtU1RO+85ttg0ZDdlxTDltBDGYUH2nashykzBuTDPL5K4FKAS2+hpebT+PFIUJf9KzEuAs3fJfSOS8nOXfEIqH/XDxCc71s8BHOw3z53rEwpJ7dM7cFdfucCI0TS51dFwl97hyH+NSkZsBZ8KFsFEs/vzDMhaiFtRcJW8SP3n9E4P38YK8NrkPpG922PazXNZyLNFhjRGKtu2yro4o6gx x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0264; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:CY1PR12MB0264; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0264; x-forefront-prvs: 084285FC5C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(1096002)(5001960100002)(189998001)(5002640100001)(5001770100001)(10400500002)(19580405001)(66066001)(5008740100001)(1220700001)(54356999)(19580395003)(4326007)(229853001)(50986999)(102836003)(6116002)(586003)(99286002)(122556002)(2501003)(87936001)(74316001)(3280700002)(3660700001)(2201001)(86362001)(3846002)(11100500001)(2906002)(92566002)(77096005)(5003600100002)(2900100001)(76576001)(33656002)(40100003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0264; H:CY1PR12MB0262.namprd12.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2016 15:08:50.4745 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0264 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some AMD GPUs have hardware support for grapics SRIOV. If the GPU has a display output then the GPU needs to support Legacy VGA operation. If CLASS_CODE = VGA then the device should have a Port Type = Legacy EndPoint. Therefore in order to enable SRIOV on a GPU with a display output LEGACY_END_POINT is supported as a valid Port Type. Signed-off-by: Kelly Zytaruk --- drivers/pci/iov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 31f31d4..da4fbac 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -388,7 +388,8 @@ static int sriov_init(struct pci_dev *dev, int pos) struct pci_dev *pdev; if (pci_pcie_type(dev) != PCI_EXP_TYPE_RC_END && - pci_pcie_type(dev) != PCI_EXP_TYPE_ENDPOINT) + pci_pcie_type(dev) != PCI_EXP_TYPE_ENDPOINT && + pci_pcie_type(dev) != PCI_EXP_TYPE_LEG_END) return -ENODEV; pci_read_config_word(dev, pos + PCI_SRIOV_CTRL, &ctrl);