From patchwork Mon Apr 22 23:12:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2474971 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 8BC383FD40 for ; Mon, 22 Apr 2013 23:12:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753958Ab3DVXMi (ORCPT ); Mon, 22 Apr 2013 19:12:38 -0400 Received: from mail-ie0-f177.google.com ([209.85.223.177]:39354 "EHLO mail-ie0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752874Ab3DVXMh (ORCPT ); Mon, 22 Apr 2013 19:12:37 -0400 Received: by mail-ie0-f177.google.com with SMTP id 9so16171iec.8 for ; Mon, 22 Apr 2013 16:12:37 -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:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=nizXETlsncuBliUuqKv1XTs+jQrfllZmazTJAQiDNbY=; b=WgU76smHV5cWielUrMEJcaqTJ7ouaoLmkus8xZpJOsFY0Rfx3C5JCAhB0uq2ifviUH h/uG2ofSZpT4c/7vU6SvccUlHwTJoM8Nsna6nsFFmU28RQQPYCeXkrqVkNWDTt0OTOpc VRjWFsRBn7oZTvU5ezhV/jDcuKIEJVAg7DvyEtwtNztLJ01+XKNIvu/SGtv68pHuAlVV Ua24EpJ2AqNx6m9q5dWZMaaWG81NXW7f96hPq5eDITyB0M+AJNE9r/dG3Q7t0hIhVCQ2 5LoRMoWDo58qOlIhkX2XDiJ72NMSvCEfc+LseB9jAWL7RQpWn9hwvBczxQYOeXTCt4GA wR2Q== 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:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=nizXETlsncuBliUuqKv1XTs+jQrfllZmazTJAQiDNbY=; b=nTskQKKjAnWe6pIlKGsWV9ZZmSVqfVD8BVbMVDbMQJw75rJlSe5vPsiRbeiOAAx85M +Q0A7IGj2r7STnNmPKVyyySl6l69leDWk15MQIDcGB+qyC9mCh9moBvl5ndtd46pMuhf 3jQotGW8BjjxDKUocjctAhbXnIBaslhXFD0Xsv3alxWowQxGpWabsBfrCWL7RgnxO//2 STkaYLNiMyOQLNg+Yto6i/mH8Kxov6LhQ0fy61tD/pB2Gm/XXCWJLCXRIhkpxE9Jw4rw 7tSpikWq0IjEvUzedeRksKpfnFVSmRp6uoalrlyPI+YRqIWVQDYgcyWh7JetwqF9uW8L PY2Q== X-Received: by 10.50.120.34 with SMTP id kz2mr10755261igb.38.1366672357043; Mon, 22 Apr 2013 16:12:37 -0700 (PDT) Received: from localhost ([172.29.120.215]) by mx.google.com with ESMTPSA id in10sm18451964igc.1.2013.04.22.16.12.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 16:12:36 -0700 (PDT) Subject: [PATCH v4 21/22] vfio-pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Alex Williamson , Gavin Shan Date: Mon, 22 Apr 2013 17:12:35 -0600 Message-ID: <20130422231235.32621.48799.stgit@bhelgaas-glaptop> In-Reply-To: <20130422230012.32621.15224.stgit@bhelgaas-glaptop> References: <20130422230012.32621.15224.stgit@bhelgaas-glaptop> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmoke7BrEJfPJ19ak2WAAgLrN9SiaQDr7MNwfgfHG3CSXCG4+jPa1+xv7woHFlRhHfj2eVydjcJsmGTn06XMxVCD7tONhKd074SG7KAmlZ6O+9G6JK6ZFT4fD1UCXeDK/jFXsWQ4J1FYrLDWYeTDtRVz9r4SmzfY69GcEiZBx5cgXL8r5pWku/yTnd7Sz/w1XR7G+A9FXYCC3e+w9V9qKPJtDilTbPK6/ekHaF4GAaO1WQq7sE= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org PCI_MSIX_FLAGS_BIRMASK is mis-named because the BIR mask is in the Table Offset register, not the flags ("Message Control" per spec) register. Signed-off-by: Bjorn Helgaas CC: Alex Williamson Acked-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 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/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index 8189cb6..10626e8 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c @@ -78,8 +78,8 @@ static int vfio_pci_enable(struct vfio_pci_device *vdev) pci_read_config_word(pdev, msix_pos + PCI_MSIX_FLAGS, &flags); pci_read_config_dword(pdev, msix_pos + PCI_MSIX_TABLE, &table); - vdev->msix_bar = table & PCI_MSIX_FLAGS_BIRMASK; - vdev->msix_offset = table & ~PCI_MSIX_FLAGS_BIRMASK; + vdev->msix_bar = table & PCI_MSIX_TABLE_BIR; + vdev->msix_offset = table & PCI_MSIX_TABLE_OFFSET; vdev->msix_size = ((flags & PCI_MSIX_FLAGS_QSIZE) + 1) * 16; } else vdev->msix_bar = 0xFF;