From patchwork Mon May 20 17:09:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 245073 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9680D2C00D6 for ; Tue, 21 May 2013 03:10:21 +1000 (EST) Received: from localhost ([::1]:35824 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeTbH-0002Mq-NB for incoming@patchwork.ozlabs.org; Mon, 20 May 2013 13:10:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeTaw-0002IM-Hr for qemu-devel@nongnu.org; Mon, 20 May 2013 13:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeTaq-0003pr-5b for qemu-devel@nongnu.org; Mon, 20 May 2013 13:09:58 -0400 Received: from mail-ia0-x22a.google.com ([2607:f8b0:4001:c02::22a]:46941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeTaq-0003pg-0f for qemu-devel@nongnu.org; Mon, 20 May 2013 13:09:52 -0400 Received: by mail-ia0-f170.google.com with SMTP id l29so7882663iag.15 for ; Mon, 20 May 2013 10:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=mgOTs/Dk7MX0pdZo9/vvRxT/1L2XwIW//U8uzmY5agw=; b=IOdXTvDBH70idvS+XnpBtUaKWEDXVdd/qvQdZi4Br1hwNqNaxGX1tdpOMC95KW+zzg kmZbkfRRnx+yGPJfQxFmgBIwiyPORN5s1zef6fIBBokFcvq/0dU+l59U3gWHSfuxS4rg LvHGfLoLi7cRhLz2vSOdIZL/eqG3LRO2AU7yVlOziH/s0EoxmavAgJRpBpKjE5iWkE1A 7MI7OPUPlGXq+XMB1cMoWihUopvBvpPcr67c/OzxRq8NjeN+VR2Pueyhc8+cIGd1t6gN RosrRVH+Vc5CB9gR8W11Ub18GU/Ee1ryhDxOrWqO58gff2SCvW+vDzWEo4DiS/FseYDR dcaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=mgOTs/Dk7MX0pdZo9/vvRxT/1L2XwIW//U8uzmY5agw=; b=Eb8FR3eZNWqTgzLawur9OFGbGglflnljz2JbRw3/UCUMHDFzwBi4rtfGS85K9i4zcz OwHAldURX3Os49RuvGdz7PVmjRnCDgw+EVz5Cu8IKe9/W7Mae4NO6X5xJ8/rJw4QxL/n DLrEFJC/IdFu2Ut3LCksv2jkhOSYzVRBRtvJUUE0m23K5QwCp0pqEBsJfH5kmH6ZHcoo kOMVNARJvPZg2MpfWWGWKjJrP07HWyKYZuF48yyYYf9EbAAD7aYUqCctlREUgEhXWyia iahHiKeDgYGFGNuDD9iCaNxAc2SpGsuhowk/cQHSNm5Fdcwoc3BPDOZtN6/oYkWkor9C OUEg== X-Received: by 10.42.78.204 with SMTP id o12mr26217207ick.38.1369069791194; Mon, 20 May 2013 10:09:51 -0700 (PDT) Received: from localhost ([172.29.122.152]) by mx.google.com with ESMTPSA id qn10sm12328010igc.6.2013.05.20.10.09.50 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 20 May 2013 10:09:50 -0700 (PDT) To: "Michael S. Tsirkin" From: Bjorn Helgaas Date: Mon, 20 May 2013 11:09:49 -0600 Message-ID: <20130520170949.29259.99889.stgit@bhelgaas-glaptop> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQm5RRWOwMnhBnq97XIrC92wECHIi3q4egpEP7rHrjRyBEUXrhPvWH8r7bKbKARGrOEIJawmAee94tC+8s8LAIx5IbC/3E55cMXNAL8eXB4y9V+UEynsWiQajQ9D3eF7/7ry6yGEzb75PWx9hu0Hq4+sricKLfm9Is04C7zlSJBShwKRVp3Ox/YiIMgETB5P2vYA1XCL X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c02::22a Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 1/2] pcie: Use same Link Capabilities defines as Linux kernel X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Linux actually doesn't have definitions for the individual L0s and L1 bits in Link Capabilities, but if/when it does, it will use these names, which follow the Link Control naming pattern. Signed-off-by: Bjorn Helgaas --- hw/pci/pcie.c | 2 +- include/hw/pci/pcie_regs.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 62bd0b8..54fcac8 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -73,7 +73,7 @@ int pcie_cap_init(PCIDevice *dev, uint8_t offset, uint8_t type, uint8_t port) pci_set_long(exp_cap + PCI_EXP_LNKCAP, (port << PCI_EXP_LNKCAP_PN_SHIFT) | - PCI_EXP_LNKCAP_ASPMS_0S | + PCI_EXP_LNKCAP_ASPM_L0S | PCI_EXP_LNK_MLW_1 | PCI_EXP_LNK_LS_25); diff --git a/include/hw/pci/pcie_regs.h b/include/hw/pci/pcie_regs.h index 4d123d9..109f2f4 100644 --- a/include/hw/pci/pcie_regs.h +++ b/include/hw/pci/pcie_regs.h @@ -39,8 +39,7 @@ #define PCI_EXP_LNK_MLW_1 (1 << PCI_EXP_LNK_MLW_SHIFT) /* PCI_EXP_LINKCAP */ -#define PCI_EXP_LNKCAP_ASPMS_SHIFT (ffs(PCI_EXP_LNKCAP_ASPMS) - 1) -#define PCI_EXP_LNKCAP_ASPMS_0S (1 << PCI_EXP_LNKCAP_ASPMS_SHIFT) +#define PCI_EXP_LNKCAP_ASPM_L0S 0x00000400 /* L0s supported */ #define PCI_EXP_LNKCAP_PN_SHIFT (ffs(PCI_EXP_LNKCAP_PN) - 1)