From patchwork Tue Feb 18 02:11:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3666701 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 BD054BF13A for ; Tue, 18 Feb 2014 02:12:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DD79F201D3 for ; Tue, 18 Feb 2014 02:11:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1D78201C7 for ; Tue, 18 Feb 2014 02:11:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752055AbaBRCJ6 (ORCPT ); Mon, 17 Feb 2014 21:09:58 -0500 Received: from mail-pd0-f180.google.com ([209.85.192.180]:43390 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753885AbaBRCJ5 (ORCPT ); Mon, 17 Feb 2014 21:09:57 -0500 Received: by mail-pd0-f180.google.com with SMTP id x10so15653356pdj.11 for ; Mon, 17 Feb 2014 18:09:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=SU0DTf/lNQsUVwN4/ahqNDNnVKoQiv75WphbTEh6XHg=; b=MfUymw3ndewHf3694XFKw22wgkUd7teoE7RSdMFXgD8aLWvMXcMUJVG9swA/lpccvy QiPkK5hs8bBZIssPiBKrx1QRW6jZMS/BXiqcaALvXMa0p2tkhz3hvBy5povll3ZeMQBs g8GtDaEiDZ66otPLIGNxf5g1AJtovKIbB0KaQmgizQhPugr8H/QkMg4MDfynaHdCBkOw ijMoG4g38YmMJ3+Pf25PjJ+a3gzO5S27LKdwCD66Tq3AUDaNAN/6CVMUNvPUOsg12JOj fGk7wKZyW2SqwrAT3/wY101hIwrczkDU+p1XfoxvCZ6Z3knPpgayi3W2f+HuZfYaFxcZ kimg== X-Received: by 10.68.130.169 with SMTP id of9mr29917976pbb.79.1392689397159; Mon, 17 Feb 2014 18:09:57 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id yz5sm129925207pac.9.2014.02.17.18.09.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Feb 2014 18:09:55 -0800 (PST) From: Magnus Damm To: linux-pci@vger.kernel.org Cc: horms@verge.net.au, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, valentine.barshak@cogentembedded.com, ben.dooks@codethink.co.uk, geert@linux-m68k.org, bhelgaas@google.com, Magnus Damm Date: Tue, 18 Feb 2014 11:11:11 +0900 Message-Id: <20140218021111.14164.93740.sendpatchset@w520> In-Reply-To: <20140218021041.14164.56411.sendpatchset@w520> References: <20140218021041.14164.56411.sendpatchset@w520> Subject: [PATCH 03/08] PCI: rcar: fix bridge logic configuration accesses Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Ben Dooks The bridge logic at slot 0 only supports reads up to 0x40 and the rest of the PCI configuration space for this slot is marked as reserved in the manual. Trying a read from offset 0x100 is producing an error from the bridge. With error interrupts enabled, the following is printed: pci-rcar-gen2 ee0d0000.pci: error irq: status 00000014 Signed-off-by: Ben Dooks Signed-off-by: Magnus Damm --- drivers/pci/host/pci-rcar-gen2.c | 4 ++++ 1 file changed, 4 insertions(+) -- 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 --- 0005/drivers/pci/host/pci-rcar-gen2.c +++ work/drivers/pci/host/pci-rcar-gen2.c 2014-02-13 09:45:45.000000000 +0900 @@ -119,6 +119,10 @@ static void __iomem *rcar_pci_cfg_base(s if (slot > 2) return NULL; + /* bridge logic only has registers to 0x40 */ + if (slot == 0x0 && where >= 0x40) + return NULL; + val = slot ? RCAR_AHBPCI_WIN1_DEVICE | RCAR_AHBPCI_WIN_CTR_CFG : RCAR_AHBPCI_WIN1_HOST | RCAR_AHBPCI_WIN_CTR_CFG;