Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759922AbdLSBPI (ORCPT ); Mon, 18 Dec 2017 20:15:08 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51604 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753224AbdLSBPG (ORCPT ); Mon, 18 Dec 2017 20:15:06 -0500 Subject: Re: [PATCH 02/13] powerpc/powernv: Set correct configuration space size for opencapi devices To: Frederic Barrat , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, gregkh@linuxfoundation.org, mpe@ellerman.id.au, alastair@au1.ibm.com References: <386af9b4afde2a0f9cd699d79b0fdf3e4fc0e2d7.1513608243.git.fbarrat@linux.vnet.ibm.com> From: Andrew Donnellan Date: Tue, 19 Dec 2017 12:14:58 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <386af9b4afde2a0f9cd699d79b0fdf3e4fc0e2d7.1513608243.git.fbarrat@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-AU Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17121901-0016-0000-0000-0000050E8926 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17121901-0017-0000-0000-0000284AAEE7 Message-Id: <266fd881-8117-967a-b70c-5db9b6211ab9@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-19_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712190013 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1811 Lines: 50 On 19/12/17 02:21, Frederic Barrat wrote: > From Andrew Donnellan Good try :) That should be "From: ..." git format-patch/send-email will handle this automatically if the commit author is set correctly, ie: git commit --amend --author="Andrew Donnellan " > > The configuration space for opencapi devices doesn't have a PCI > Express capability, therefore confusing linux in thinking it's of an > old PCI type with a 256-byte configuration space size, instead of the > desired 4k. So add a PCI fixup to declare the correct size. > > > Signed-off-by: Andrew Donnellan > Signed-off-by: Frederic Barrat > --- > arch/powerpc/platforms/powernv/pci-ioda.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c > index c37b5d288f9c..b8ec76aa266f 100644 > --- a/arch/powerpc/platforms/powernv/pci-ioda.c > +++ b/arch/powerpc/platforms/powernv/pci-ioda.c > @@ -4079,6 +4079,16 @@ void __init pnv_pci_init_npu2_opencapi_phb(struct device_node *np) > pnv_pci_init_ioda_phb(np, 0, PNV_PHB_NPU_OCAPI); > } > > +static void pnv_npu2_opencapi_cfg_size_fixup(struct pci_dev *dev) > +{ > + struct pci_controller *hose = pci_bus_to_host(dev->bus); > + struct pnv_phb *phb = hose->private_data; > + > + if (phb->type == PNV_PHB_NPU_OCAPI) > + dev->cfg_size = PCI_CFG_SPACE_EXP_SIZE; > +} > +DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, pnv_npu2_opencapi_cfg_size_fixup); > + > void __init pnv_pci_init_ioda_hub(struct device_node *np) > { > struct device_node *phbn; > -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnellan@au1.ibm.com IBM Australia Limited