From patchwork Thu Jan 7 23:20:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ananth, Rajesh" X-Patchwork-Id: 7980801 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 407DDBEEED for ; Thu, 7 Jan 2016 23:53:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D8F420172 for ; Thu, 7 Jan 2016 23:53:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1BDD720117 for ; Thu, 7 Jan 2016 23:53:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753619AbcAGXxS (ORCPT ); Thu, 7 Jan 2016 18:53:18 -0500 Received: from mail-bn1bon0088.outbound.protection.outlook.com ([157.56.111.88]:39472 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753109AbcAGXxR convert rfc822-to-8bit (ORCPT ); Thu, 7 Jan 2016 18:53:17 -0500 X-Greylist: delayed 1985 seconds by postgrey-1.27 at vger.kernel.org; Thu, 07 Jan 2016 18:53:17 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartm.onmicrosoft.com; s=selector1-smartm-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=g/U/54onwNOzRxlj6hahju2E5NzRNF2GJBf5m4AmLHQ=; b=RGaS97qR/8nfEzyclIyi0f7cCaBlx+KLsngWThtMgw98qlzuXHJdliKgPb+OaPUhialjn1+/QbH7x34j8M43O+kcK3P57m0iIUE0UZCNmGMe82rsvx9Q/Q5zL9xuXv8kRkObDG5U98SlPZYUxCHjVECUxig+/A6m2Z/RboZLC8U= Received: from BLUPR0401MB1683.namprd04.prod.outlook.com (10.162.214.157) by BLUPR0401MB1684.namprd04.prod.outlook.com (10.162.214.158) with Microsoft SMTP Server (TLS) id 15.1.365.19; Thu, 7 Jan 2016 23:20:02 +0000 Received: from BLUPR0401MB1683.namprd04.prod.outlook.com ([10.162.214.157]) by BLUPR0401MB1683.namprd04.prod.outlook.com ([10.162.214.157]) with mapi id 15.01.0361.006; Thu, 7 Jan 2016 23:20:02 +0000 From: "Ananth, Rajesh" To: "bhelgaas@google.com" CC: "linux-pci@vger.kernel.org" Subject: FW: [PATCH 4.4-rc8] pci: Make 4K config space available for non PCI-e/PCI-X devices Thread-Topic: [PATCH 4.4-rc8] pci: Make 4K config space available for non PCI-e/PCI-X devices Thread-Index: AdFJkW7c7jOkaNguQoC4bFsQPq9GfQAEAc1w Date: Thu, 7 Jan 2016 23:20:01 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rajesh.Ananth@smartm.com; x-originating-ip: [65.249.22.10] x-microsoft-exchange-diagnostics: 1; BLUPR0401MB1684; 5:vuEb2+G9qSkMeNgQBmb8S2ZXwz54lkTQ5VYNqNRe5jPLdrDSTuMoTG877La4xQDCI3eF9Z/4XGzAScFOef1ueOkvaX0XFG3XmNxkZonBYqmAOPWE0tq9wnlhgcdIkaGBz6I2ZPNiD/4UZ5NsoARuRg==; 24:My2gP4LX3iID/n9n4jxzNnW+26yAt5ickrvaOuxRcNw50QKhGAeirou/VAo4aCzmGXGfbVki8mS4aaZvru79JpiWatJyWVhcnWwATiBOxAY=; 20:btrWErH+Sjgj8jZTgWpCdwGK8EsdPEDHIuVNsyyNVWfXQfCrjr/ntT8nFF/8TnbJTkWuMxe29irpz3HO2lVllJh0wSV/tUKBx5zyyB1SIq9gJ56Cr893WFcfIQkigHmYp8sxbWbqbEhXnG6TMQsyOq58gKMLF3Sy+nKbzCmwBh8= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0401MB1684; x-ms-office365-filtering-correlation-id: 6767f0f3-a740-49d3-0f68-08d317b911b4 x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185834192372374); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046); SRVR:BLUPR0401MB1684; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0401MB1684; x-forefront-prvs: 0814A2C7A3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(6009001)(199003)(189002)(377424004)(50944005)(5002640100001)(11100500001)(77096005)(122556002)(19580395003)(5001960100002)(19580405001)(2501003)(2351001)(189998001)(86362001)(97736004)(81156007)(54356999)(5004730100002)(40100003)(50986999)(74316001)(33656002)(101416001)(2906002)(110136002)(2900100001)(66066001)(87936001)(1220700001)(99286002)(5003600100002)(106356001)(105586002)(1096002)(76576001)(1730700002)(3846002)(10400500002)(92566002)(6116002)(102836003)(586003)(4326007)(5008740100001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0401MB1684; H:BLUPR0401MB1683.namprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: smartm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: smartm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jan 2016 23:20:02.0273 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f0fd7909-cd13-4779-b0f9-5ced6b7a2c68 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0401MB1684 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Resending this in PLAIN TEXT. Description: The Kernel PCI driver that probes the devices always reports the config space as 256 bytes for the PCI devices that are not PCI-e or PCI-X.   There are some vendor devices that are not PCI-e or PCI-X, but might have the configuration space data that is more than 256 bytes  in size to be made accessible through the standard sys-fs "/sys/bus/pci/devices/./config" link.   Currently, the current Kernel does not provide the extended config space access for those devices, and a proprietary mechanism is oftentimes used by the vendor utilities to address that. As the problem could be seen, use of proprietary tools and utilities automatically leads to user confusion of using non-standard tools across different vendor devices. Patch: Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I     have the right to submit it under the open source license     indicated in the file; or (b) The contribution is based upon previous work that, to the best     of my knowledge, is covered under an appropriate open source     license and I have the right under that license to submit that     work with modifications, whether created in whole or in part     by me, under the same open source license (unless I am     permitted to submit under a different license), as indicated     in the file; or (c) The contribution was provided directly to me by some other      person who certified (a), (b) or (c) and I have not modified      it. (d) I understand and agree that this project and the contribution      are public and that a record of the contribution (including all      personal information I submit with it, including my sign-off) is      maintained indefinitely and may be redistributed consistent with     this project or the open source license(s) involved.     Signed-off-by: Rajesh A Developer --- 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 --- linux-4.4-rc8/drivers/pci/probe.c.orig      2016-01-07 13:30:54.310392700 -0800 +++ linux-4.4-rc8/drivers/pci/probe.c   2016-01-07 13:32:14.586392700 -0800 @@ -1119,28 +1119,8 @@ static int pci_cfg_space_size_ext(struct int pci_cfg_space_size(struct pci_dev *dev) { -       int pos; -       u32 status; -       u16 class; - -       class = dev->class >> 8; -       if (class == PCI_CLASS_BRIDGE_HOST) -               return pci_cfg_space_size_ext(dev); - -       if (!pci_is_pcie(dev)) { -               pos = pci_find_capability(dev, PCI_CAP_ID_PCIX); -               if (!pos) -                       goto fail; - -               pci_read_config_dword(dev, pos + PCI_X_STATUS, &status); -               if (!(status & (PCI_X_STATUS_266MHZ | PCI_X_STATUS_533MHZ))) -                       goto fail; -       } -         return pci_cfg_space_size_ext(dev); - fail: -       return PCI_CFG_SPACE_SIZE; } #define LEGACY_IO_RESOURCE     (IORESOURCE_IO | IORESOURCE_PCI_FIXED)