From patchwork Tue Mar 11 17:43:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 3813581 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 590ECBF540 for ; Tue, 11 Mar 2014 17:44:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82F7C20219 for ; Tue, 11 Mar 2014 17:44:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EE15201F0 for ; Tue, 11 Mar 2014 17:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753838AbaCKRnq (ORCPT ); Tue, 11 Mar 2014 13:43:46 -0400 Received: from mail-ie0-f180.google.com ([209.85.223.180]:63185 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755255AbaCKRnN (ORCPT ); Tue, 11 Mar 2014 13:43:13 -0400 Received: by mail-ie0-f180.google.com with SMTP id as1so9334527iec.11 for ; Tue, 11 Mar 2014 10:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=eGY/OWBacX0j+q4VOPQUCPHgCrOIyPTWEkPTIEN4nO8=; b=GDMXCpeDADIdUPbfsDvvWGaDOGzEADH4lcovAoSmJQaa9ardSROK7wF78m+o5+0eD1 PZj/afilsOApS2jUwVxVncFXgmONIGp57L8AE+ht4djLMt21yC9WvvF/U7RbFNzve8ow nERcRL1P5t/fn0es7CHg8Dg7liXOyQqx3zfF3nYpdsxD+wu7llE3BolqH9DMnmplaTzF rAbIwz20wyCCAaBK3BhB6NAZsB0vklkD2cue+RQ0HDRiq/R5YpA6S7oduHAwXky4MMo4 azq5H1udg1GYSV/uvKyeDTBw9amfXYJdw7t+EB7Fx6laf5UYFzj4Qvtt2gzI/JCSSV6R Ue8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=eGY/OWBacX0j+q4VOPQUCPHgCrOIyPTWEkPTIEN4nO8=; b=FIVxT6o+mctuE7brygJA1JoxC6+PpVkVn0bBSUImDazX7UOsYg7dlZKkiJc5mlQP7D 0teXQvnmKWGUzY0vidbaFBtR5d4Q+g9r1zsckI7JJuCnqzKr2StR70TU7woZvNeLcuYQ 8S1Ly325cgQfeSXY+SYYoQ/RWABwEn54MDIOiDj05YeCwcAoxfkKirnBm+j2+wDR3euh MFiZi+JRc5EeFAQ3bBT8Mdl8pYsOFdBCmDIIV7AYsXmGjGh7QwqckGFyZYJ4u2VoGV57 sW3saPdJTLeI/I4HBheouvCmQjUxzFO96/OGci9RWdjLqALJZedJq4UO4JCiQsmRzizh CCHw== X-Gm-Message-State: ALoCoQmANEeuCHza6LBPFgXVajniQSuh2XZ7YV6kZlZEOoMARNt8L6Z+f1eUG13mF7GHl3RYEOpRUdLVsINeYPoEC+RB1SU2hXhbyytkiQeqTLPe0kn6Y13gyUT/xUW0y9g1SMDg3olcZjvtWuhH174EapWY+zQJMtC7CYUVHyE6R3KWwrcK1IBJbcEFWy7kw+lpefijsBLy/eEo3tdGRapT57/TB9ckSrXHm48HSP5+qug0awyKsLQ= X-Received: by 10.42.119.134 with SMTP id b6mr33522457icr.31.1394559793165; Tue, 11 Mar 2014 10:43:13 -0700 (PDT) Received: from localhost ([172.16.50.109]) by mx.google.com with ESMTPSA id mi2sm49373601igb.3.2014.03.11.10.43.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 11 Mar 2014 10:43:12 -0700 (PDT) Subject: [PATCH 5/5] PCI: Log IDE resource quirk in dmesg To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Paul Bolle , Yinghai Lu , linux-kernel@vger.kernel.org Date: Tue, 11 Mar 2014 11:43:12 -0600 Message-ID: <20140311174311.23084.15128.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20140311173556.23084.57635.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <20140311173556.23084.57635.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.16 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,RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Make a note in dmesg when we overwrite legacy IDE BAR info. We previously logged something like this: pci 0000:00:1f.1: reg 0x10: [io 0x0000-0x0007] and then silently overwrote the resource. There's an example in the bugzilla below. This doesn't fix the bugzilla; it just makes what's going on more obvious. No functional change; merely adds some dev_info() calls. Link: https://bugzilla.kernel.org/show_bug.cgi?id=48451 Signed-off-by: Bjorn Helgaas --- drivers/pci/probe.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 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/pci/probe.c b/drivers/pci/probe.c index 02654b5ec1b9..6c69c9bb31fb 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1131,10 +1131,10 @@ int pci_setup_device(struct pci_dev *dev) pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &dev->subsystem_device); /* - * Do the ugly legacy mode stuff here rather than broken chip - * quirk code. Legacy mode ATA controllers have fixed - * addresses. These are not always echoed in BAR0-3, and - * BAR0-3 in a few cases contain junk! + * Do the ugly legacy mode stuff here rather than broken chip + * quirk code. Legacy mode ATA controllers have fixed + * addresses. These are not always echoed in BAR0-3, and + * BAR0-3 in a few cases contain junk! */ if (class == PCI_CLASS_STORAGE_IDE) { u8 progif; @@ -1145,11 +1145,15 @@ int pci_setup_device(struct pci_dev *dev) res = &dev->resource[0]; res->flags = LEGACY_IO_RESOURCE; pcibios_bus_to_resource(dev->bus, res, ®ion); + dev_info(&dev->dev, "legacy IDE quirk: reg 0x10: %pR\n", + res); region.start = 0x3F6; region.end = 0x3F6; res = &dev->resource[1]; res->flags = LEGACY_IO_RESOURCE; pcibios_bus_to_resource(dev->bus, res, ®ion); + dev_info(&dev->dev, "legacy IDE quirk: reg 0x14: %pR\n", + res); } if ((progif & 4) == 0) { region.start = 0x170; @@ -1157,11 +1161,15 @@ int pci_setup_device(struct pci_dev *dev) res = &dev->resource[2]; res->flags = LEGACY_IO_RESOURCE; pcibios_bus_to_resource(dev->bus, res, ®ion); + dev_info(&dev->dev, "legacy IDE quirk: reg 0x18: %pR\n", + res); region.start = 0x376; region.end = 0x376; res = &dev->resource[3]; res->flags = LEGACY_IO_RESOURCE; pcibios_bus_to_resource(dev->bus, res, ®ion); + dev_info(&dev->dev, "legacy IDE quirk: reg 0x1c: %pR\n", + res); } } break;