From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id C7B9D1A03ED for ; Fri, 19 Jun 2015 12:27:23 +1000 (AEST) Received: from /spool/local by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Jun 2015 12:27:20 +1000 Received: from d23relay08.au.ibm.com (d23relay08.au.ibm.com [9.185.71.33]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id C70A42BB0047 for ; Fri, 19 Jun 2015 12:27:17 +1000 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t5J2R6t047775832 for ; Fri, 19 Jun 2015 12:27:15 +1000 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t5J2QiYU025938 for ; Fri, 19 Jun 2015 12:26:44 +1000 From: Gavin Shan To: linuxppc-dev@lists.ozlabs.org Cc: Gavin Shan Subject: [PATCH 0/4] powerpc/powernv: Fix PE number for PF Date: Fri, 19 Jun 2015 12:26:15 +1000 Message-Id: <1434680779-20194-1-git-send-email-gwshan@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , When CONFIG_PCI_IOV is enabled in kernel configuration, the logic reserving PEs according to consumed M64 segments in bridge's M64 window won't work properly. The bridge's M64 window contains VF BARs, which are M64 BARs. Current code could reserve and pick PE number according to M64 segments accomodating VF BARs. The patches fix the issue by reserving and picking PE numbers based on BARs (exclude VF BARs) of PCI devices, instead of bridge's M64 window. The code is picked from the patchset "powerpc/powernv: PCI hotplug support", I'm working on. With the patch applied, the PE number assigned to PF is correct: [root@powerio-le11 ~]# lspci -vvs 0005:01:00.0 0005:01:00.0 Ethernet controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro] Subsystem: IBM Device 04e7 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR-