From patchwork Thu Oct 29 15:24:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 56477 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9TFRVQM010374 for ; Thu, 29 Oct 2009 15:27:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755277AbZJ2P1Z (ORCPT ); Thu, 29 Oct 2009 11:27:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755259AbZJ2P1Z (ORCPT ); Thu, 29 Oct 2009 11:27:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9472 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755207AbZJ2P1Y (ORCPT ); Thu, 29 Oct 2009 11:27:24 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9TFRPtp025879; Thu, 29 Oct 2009 11:27:25 -0400 Received: from redhat.com (vpn-10-34.str.redhat.com [10.32.10.34]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n9TFRLOP015167; Thu, 29 Oct 2009 11:27:22 -0400 Date: Thu, 29 Oct 2009 17:24:59 +0200 From: "Michael S. Tsirkin" To: Jesse Barnes , Alex Chiang , Yu Zhao , Matthew Wilcox , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, gleb@redhat.com Subject: [PATCH] pci: fix nit in ROM BAR size probing Message-ID: <20091029152459.GA5480@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 8105e32..d65aae4 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -163,12 +163,12 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, { u32 l, sz, mask; - mask = type ? ~PCI_ROM_ADDRESS_ENABLE : ~0; + mask = type ? PCI_ROM_ADDRESS_MASK : ~0; res->name = pci_name(dev); pci_read_config_dword(dev, pos, &l); - pci_write_config_dword(dev, pos, mask); + pci_write_config_dword(dev, pos, l | mask); pci_read_config_dword(dev, pos, &sz); pci_write_config_dword(dev, pos, l);