From patchwork Mon Jan 26 17:05:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 5711421 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 09F519F302 for ; Mon, 26 Jan 2015 17:05:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3B1F92013A for ; Mon, 26 Jan 2015 17:05:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65D5E200E8 for ; Mon, 26 Jan 2015 17:05:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756392AbbAZRFw (ORCPT ); Mon, 26 Jan 2015 12:05:52 -0500 Received: from mail-wg0-f48.google.com ([74.125.82.48]:58211 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753100AbbAZRFs (ORCPT ); Mon, 26 Jan 2015 12:05:48 -0500 Received: by mail-wg0-f48.google.com with SMTP id x12so10153468wgg.7; Mon, 26 Jan 2015 09:05:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=2mF0vwFlbZSKhbIlBHaio+HZeJrN2pjrhsuThZ6pDJE=; b=U1OpVt/y37KygQ9jfYmtWJcqApQwqUCMTTCt1zkTpfmg4yiC5P3JFQf4/yROZkTzbG h0hRnjHgXZm5QUSdFDG+SWDZVKfW61a6m2XILcZtF5/S8dN741U9kO5NPquM1Jb3M+zt /Zl7OJPl5Y4Ary2tRaGooz03TxOpxXaSCBM0cb3gkyNRtTP1fZ1uxx63FZGDzo5q7Fc3 3cAbjkEnPdTdM3HVpkobOMmHqdYFJOR2bbKuquMRLHxpRDMnGYMFFIr2cDxzLBokvape Mkk9+AFW1Mhw6eEVQQ2zMIVFaTdziwcb/bnYGgS3qLuuyHr70A0O7S9bx6nNDNklNRvk TtAQ== X-Received: by 10.194.6.228 with SMTP id e4mr47339737wja.63.1422291945446; Mon, 26 Jan 2015 09:05:45 -0800 (PST) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id fm10sm14715467wib.7.2015.01.26.09.05.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jan 2015 09:05:44 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Bjorn Helgaas , linux-pci@vger.kernel.org Cc: Matt Porter , Alexandre Bounine , Chris Metcalf , Bradley Grove , linux-scsi@vger.kernel.org, Realtek linux nic maintainers , netdev@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH 1/5] PCI: Add defines for max read request sizes Date: Mon, 26 Jan 2015 18:05:22 +0100 Message-Id: <1422291922-12324-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 There are few drivers using magic numbers when operating with PCIe capabilities and PCI_EXP_DEVCTL_READRQ. Define known values to allow cleaning their code a bit. Signed-off-by: Rafa? Mi?ecki --- include/uapi/linux/pci_regs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index 4a1d0cc..efe3443 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h @@ -451,6 +451,10 @@ #define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ #define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */ #define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ +#define PCI_EXP_DEVCTL_READRQ_128B 0x0000 /* 128 Bytes */ +#define PCI_EXP_DEVCTL_READRQ_256B 0x1000 /* 256 Bytes */ +#define PCI_EXP_DEVCTL_READRQ_512B 0x2000 /* 512 Bytes */ +#define PCI_EXP_DEVCTL_READRQ_1024B 0x3000 /* 1024 Bytes */ #define PCI_EXP_DEVCTL_BCR_FLR 0x8000 /* Bridge Configuration Retry / FLR */ #define PCI_EXP_DEVSTA 10 /* Device Status */ #define PCI_EXP_DEVSTA_CED 0x0001 /* Correctable Error Detected */