From patchwork Fri Jul 13 21:57:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1197061 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 8B1F4DFFFD for ; Fri, 13 Jul 2012 21:57:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752578Ab2GMV5y (ORCPT ); Fri, 13 Jul 2012 17:57:54 -0400 Received: from mail-qc0-f202.google.com ([209.85.216.202]:57368 "EHLO mail-qc0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752414Ab2GMV5x (ORCPT ); Fri, 13 Jul 2012 17:57:53 -0400 Received: by qcqs25 with SMTP id s25so391435qcq.1 for ; Fri, 13 Jul 2012 14:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:date:message-id:in-reply-to:references:user-agent :mime-version:content-type:content-transfer-encoding; bh=RWar5ydzVUor898E7mp3g66qIblAY3jGsyWE/PmtHJg=; b=DZ6VbLyRHOcmeugv1bTUS7zLazHrEPDQH1JVNO7/Sjc4LFQDjgbRY3tanfTyzxm8/t Mk+cT+LUF2797D7WVTXNi9UmoJZ6r1469pWcis26qQPlveJ+n20y/EV0FW0NYEWQeRHp YpzaUMUGfrFpYxwtuj0YA2N+rmPGIiMfzuDoNGWY2eegkARev/TLu29ahgUUnLn+0qua Cp7jWY9SNeVbYHLndZAoHNCloaIc52a6RTMVK1QdCnLsPy7Ed+DiZ6DbHt0htT9l9TYk I4ku+f3eVCH8BEECckZqzfJ9NjXhdAzvi6fWT9YIVg8MEyWo1tSv2na/4xIAg2NQd3Sp KJTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:date:message-id:in-reply-to:references:user-agent :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=RWar5ydzVUor898E7mp3g66qIblAY3jGsyWE/PmtHJg=; b=bUVOOBplQLSrmnWoE8pVDswIRmYXwCI1E/kv10P2JtKdJSQOj9b/S6TQQ4Mt3Bi00U VFAyhElTPTn2+VQ6XjkTVDDg8xNlHrJscCCsiZHuNpEvZcsoy9pPZvQzjfzew1wLQgkw 768SkeKqlDvUNMZBIcA23gFR/m0by7Xzxqr3Lax2pYHeEBvUU50CkrtCBEaq58DwUWOJ 6wARAme6nuj+ZIUEWzKU/h96VNNwrqgg+iyWchInCi1S1QjW+UtOXlYkBI2ZL+Bq2sSA OnZgFlDd2qFhThiS+qi7PHs4hyK/KtLDs/AOlIB+Ol1bISx4ouNTfervHBP9rRsBa1+g ghqA== Received: by 10.236.189.36 with SMTP id b24mr5713132yhn.9.1342216672628; Fri, 13 Jul 2012 14:57:52 -0700 (PDT) Received: by 10.236.189.36 with SMTP id b24mr5712947yhn.9.1342216671629; Fri, 13 Jul 2012 14:57:51 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id t29si2588125yha.0.2012.07.13.14.57.50 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 13 Jul 2012 14:57:50 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.18.96.155]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id C062D100048 for ; Fri, 13 Jul 2012 14:57:50 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id 7590418004F for ; Fri, 13 Jul 2012 14:57:50 -0700 (PDT) Subject: [PATCH 2/2] PCI: add Vendor-Specific Extended Capability header info To: linux-pci@vger.kernel.org From: Bjorn Helgaas Date: Fri, 13 Jul 2012 15:57:50 -0600 Message-ID: <20120713215750.21756.21414.stgit@bhelgaas.mtv.corp.google.com> In-Reply-To: <20120713215258.21756.42132.stgit@bhelgaas.mtv.corp.google.com> References: <20120713215258.21756.42132.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkacZChII3/lkt6lUBLWIZvWdm5BItNrQUo/wZNk041icrPAIH8HQszQ+cnHmvrxA+ufmnmBGCT4HCpBOMxOmduSZ7agsvVaH9ug/l2CkBAYGsOf9Wyesh9Zi1X6z5Teyt2gb2mL2rEB758Z9z7W+WThnQqOuDJM5FYXe8q9xMMwQe13Qi1m8LxigQnEKZmxMK/bTanDEKZ2ja4FNhXES4rvLPBiA== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org This adds the fields in the Vendor-Specific Header: ID, Rev, and Length. There may be multiple Vendor-Specific capabilities, so drivers should use the VSEC ID to identify the one of interest. Signed-off-by: Bjorn Helgaas --- include/linux/pci_regs.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) -- 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/include/linux/pci_regs.h b/include/linux/pci_regs.h index 4b608f5..0f3e814 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h @@ -615,6 +615,12 @@ #define PCI_PWR_CAP 12 /* Capability */ #define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ +/* Vendor-Specific (VSEC, PCI_EXT_CAP_ID_VNDR) */ +#define PCI_VNDR_HEADER 4 /* Vendor-Specific Header */ +#define PCI_VNDR_HEADER_ID(x) ((x) & 0xffff) +#define PCI_VNDR_HEADER_REV(x) (((x) >> 16) & 0xf) +#define PCI_VNDR_HEADER_LEN(x) (((x) >> 20) & 0xfff) + /* * Hypertransport sub capability types *