From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752133AbbJLMD1 (ORCPT ); Mon, 12 Oct 2015 08:03:27 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:51708 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346AbbJLMDX (ORCPT ); Mon, 12 Oct 2015 08:03:23 -0400 From: Arnd Bergmann To: Bjorn Helgaas Cc: Ley Foon Tan , Russell King - ARM Linux , Bjorn Helgaas , Marc Zyngier , Dinh Nguyen , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Lorenzo Pieralisi Subject: Re: [PATCH v8 3/6] pci:host: Add Altera PCIe host controller driver Date: Mon, 12 Oct 2015 14:03:04 +0200 Message-ID: <7064179.1W3LTfFPxP@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151009231540.GE16112@localhost> References: <1444297394-3122-1-git-send-email-lftan@altera.com> <20151009231540.GE16112@localhost> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:UNVOujXg6mK9VDQndUb5NuE4rvYIdaBnuPMLWBBMLg3CWcAHvqM MduKwsLEDSkL/YWX01W/EO8bRHxdkb5URm5kq5G8boqolbcfdGOWQVdS4gicbTYzBN0QZsx Ndg2MpNQxMRdd48176GpkHqlOhi06Bp8LgdBR0jbX7k9/ZEVt//omMwsiNmH/66hIRuL67X eeEHDKnbKtabod7ibUH+A== X-UI-Out-Filterresults: notjunk:1;V01:K0:A7O7EDoyvis=:9JnarY0HBkHObRqUndK0Az K9COHRTSGXtQOj2LjcVopfNqyC8KxKtciL/tLpXWNbLuQ8/FGldwUwRxBMDzakQq/4Z9Vzu6c Q6K5rW+ZMLEhwCOU4DuCGdIaS0o6hBt5na1++ihlm+mY6mjHNFxLHIdItJB1+xfuYUHul1k9q slNzUZDF8dST7iSdKT4ds55Mam6cVHgF6RQXxQGi90q+IP/MyXt3OKfv7WHOihA3Ay1uEVctD 4er/QraKizCx/rXpxCNNlSsduv1KBQqy4ozDB2w2KN3yyLdlBZdhiWcFCAAaFt7BPww6/Bknu d8Vm/4sgr+x18DRPfQP4Pmhf+yUyps6nTbp9+D6DrL6VqgbFuOCdbjhWux1Ji6XR0gwX5WErI 9ZfMCg0PGKDPzdfg6+GGSbR17u7xh5CCtdJIVhnaj1h8Z2DSkv/OCXQCCqzeWWz0hbLrr5lli hl/lzVLv0UG9j9TZslYG8j50e9dYYFTA8d1Xmx8tj4ugZWqYurLlLIax4WxSrlZ6q5oENVs/z N+3OiuhrGRFtNTopkm2HOHrF5gcoK5eO1T+1Il5KXSq179kVM/jbpLRK90439TrjTUVf7Z96s 8FOMIfauucjpaqTKLXFHZ8VMX1DU/+PqeGbvktQFa/eH/Rkek+3JFtrgUNRyCI0MxtU0qV1Fl d/8lHMoPTPk7ZjDPiAziKomeAoqcPnHG/eitmopusaJcGqUxxTDKL+XmV1lheiJg4epLBZ7EB ZrHSg55b8rfw5yEb Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 09 October 2015 18:15:40 Bjorn Helgaas wrote: > > I don't know if this should be a kernel taint, a simple warning in > dmesg, or what. I guess the tainting mechanism is probably too > general-purpose for this, and add_taint() doesn't give any dmesg > indication. We wouldn't see the taint unless the problem actually > caused an oops or panic. In this case, I think I want a clue in dmesg > so we have a chance of seeing it even if there is no oops. So > probably something like a dev_warn("non-compliant config accesses") > would work. > > You really should double-check with the hardware guys, because it's > pretty obvious that the PCI spec requires 1- and 2-byte config > accesses to work correctly. For example, if you read/modify/write to > update PCI_COMMAND, you will inadvertently clear the RW1C bits in > PCI_STATUS. Would it help to require a DT property here that flags the device as having a broken config space? Then we could implement both in the driver, and only use the RMW based implementation if the firmware describes the device as "altera,broken-pci-config-space". Arnd