Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp926688imc; Mon, 11 Mar 2019 02:34:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPRFBuvu3H7vmLdHygw66IBt7Eli7rd1xUAR4r8vBSLvBD3kkf1mSfYxYeZCMfCpqMJym5 X-Received: by 2002:a63:68ca:: with SMTP id d193mr28940722pgc.53.1552296888650; Mon, 11 Mar 2019 02:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552296888; cv=none; d=google.com; s=arc-20160816; b=jUqWw/5VM/w4G3jiAxMSF9gV3zFq1TekxfCQ2nRw0SnOYhCFNBIosGUDDi2ZMJ9J10 Z8/rgXhpVyLxfNF+Vk9b23Xhz7e7d7ot5DewjqnapQAWy188ODsX/HjMnnacFazJDoru 8Hg5yyE/yonKWcq6UyCqFf79zzRlYHwRoyf8Tzead4jlBNp5xPZsv+M0S/ReaWNBYlJi dJRn6QsBXtQ6ab8uDDOML/4FDXtq+pxjaBhy/FGg27vrHzxpwyuJ57Y6410y8UDum1M+ cJo7qjlOYH5GTOKUf+cnK39+o2w5h7nNlIcME1Mylk4O/qu2Bx1GkK+jL7BCt3ANO9ga E4Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=nGt2kptfSYFWIMpJrzSgidPyvIMtRAfU6GlQDpaCshM=; b=oie8HAluiAO7UXity/6USCjpBxmzYXooD6oCXDd3epLKCTTzb8hnnDD6BicWse00A/ 030vws/5dL5Cqj+wtdqpjovBCLGSWRDd5WONtkFrtglC0pvj7YMdfpR8vGZLrMkqKAzq In0q8fI0TPa3qsT61i2L7Cm15L/r9mKUUBA+rFGQo6XEOpG/eMo2GkUcjatBWYKjnP6q kit6cTvPTLLJNy0HMD8SEsXj3XoLSHrSKaETEO9o4++yC7sJQd6lI7sTD2UFLJaA/eed pImBYbmFe26o8rVsFPMq4V/aI8G7BAvoEhN4OSnE3B/khYh0T+2TUWnufK6lvgjWcLue 59kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=gJ8eeGrd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ct12si5368491plb.422.2019.03.11.02.34.33; Mon, 11 Mar 2019 02:34:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=gJ8eeGrd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727442AbfCKJcc (ORCPT + 99 others); Mon, 11 Mar 2019 05:32:32 -0400 Received: from mail-eopbgr80085.outbound.protection.outlook.com ([40.107.8.85]:48938 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727262AbfCKJc2 (ORCPT ); Mon, 11 Mar 2019 05:32:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nGt2kptfSYFWIMpJrzSgidPyvIMtRAfU6GlQDpaCshM=; b=gJ8eeGrdyJAJyx/mCGBjC9dccsRytNaMtAbdkHqjKFl7RasCQjqcjJrL+3r8Dc/mUIPD8ifQDWDVBbf8zTF955M0tTLREu2xmOhl7iA1gyTjC8ksb3KSpAMSxb4K4yUA77p2kwkrS837ZMaTkdVWNZzRHD0U61GzfabD0aEZx6U= Received: from AM6PR04MB5781.eurprd04.prod.outlook.com (20.179.3.19) by AM6PR04MB6566.eurprd04.prod.outlook.com (20.179.246.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.16; Mon, 11 Mar 2019 09:32:11 +0000 Received: from AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7]) by AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7%2]) with mapi id 15.20.1686.021; Mon, 11 Mar 2019 09:32:11 +0000 From: "Z.q. Hou" To: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" CC: Mingkai Hu , "M.h. Lian" , Xiaowei Bao , "Z.q. Hou" Subject: [PATCHv4 17/28] PCI: mobiveil: fix the checking of valid device Thread-Topic: [PATCHv4 17/28] PCI: mobiveil: fix the checking of valid device Thread-Index: AQHU1+1NSbzhbwea50ueS7B7aR1vuw== Date: Mon, 11 Mar 2019 09:32:11 +0000 Message-ID: <20190311093130.7209-18-Zhiqiang.Hou@nxp.com> References: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR03CA0015.apcprd03.prod.outlook.com (2603:1096:203:2e::27) To AM6PR04MB5781.eurprd04.prod.outlook.com (2603:10a6:20b:ad::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3f696517-ce7a-432e-787e-08d6a604700b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR04MB6566; x-ms-traffictypediagnostic: AM6PR04MB6566: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1;AM6PR04MB6566;23:9U+afKuykMiupYBandF6T1h7pl0VMCRlf7rCJBN?= =?iso-8859-1?Q?MS3nt1MPc8pAE49dHHBCQgQ0F9CLmjhJP7CcEyjarsfTTr2P+igKJ2UDtx?= =?iso-8859-1?Q?8ymn3i0O2HX5cty0hB+3UTxhKnyOHtZMEDTjKz5c7n3zCQCOEzsFIps+a0?= =?iso-8859-1?Q?nOGPd0ZdEbt1l4VSDQmMOu9AmEhUOhIPqmbIUPbGo+41Be+aopHuo8OXlJ?= =?iso-8859-1?Q?hLlv1OLAgkapv8ysTy7deBcZT7MDX/O1xLrMS3Ef27jE5V78bXQn5uISWZ?= =?iso-8859-1?Q?wu5n/idEdFVfZiDHuuq6dL/i5pFpqQiTN4PPh1t5tCq3bJ+PXZXLxPF9TI?= =?iso-8859-1?Q?YDyyD+hRZEJdkjfp7kReJ4RI3Qlrld4lMpR/lonMAr/tqbO76CqljiNyOl?= =?iso-8859-1?Q?zOdKGQjwGkAkn8qsccRcUEELTZEzUQf/46pd7X8/lzJoW8Svixt1FBfoPR?= =?iso-8859-1?Q?WsYiGsGs2neJN89FNA04ihzBhmTVxzJxTzDG5oCTlK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FuLVWnx8BfRnf8xgeYd?= x-microsoft-antispam-prvs: x-forefront-prvs: 09730BD177 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(366004)(39860400002)(346002)(376002)(136003)(199004)(189003)(6436002)(478600001)(25786009)(99286004)(11346002)(2616005)(476003)(76176011)(3846002)(6116002)(81166006)(81156014)(486006)(71190400001)(71200400001)(2906002)(8676002)(2201001)(5660300002)(97736004)(6486002)(446003)(7416002)(2501003)(86362001)(5024004)(14444005)(256004)(14454004)(316002)(68736007)(26005)(8936002)(6512007)(53936002)(1076003)(66066001)(386003)(54906003)(50226002)(110136005)(102836004)(6506007)(36756003)(105586002)(4326008)(106356001)(186003)(305945005)(52116002)(7736002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB6566;H:AM6PR04MB5781.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: /mnwCYsHzTMw8NxRjkFUaQgpCyUtybhTXHm8aSiIjXrsZrw4xzhg2pe64sjrPWvSfsoz7cVXYPzK4bh/oS1RbDFhLVOglkm7hhYUpr6pjrjMpap5WmVgBkKU8MtIqzyEVbD+9to3o2y3rQtkBRXPsPzhn7dHv9YHUg2fnjEVoLyEYJwQrbs0edHnpEsPR5upqUxZ0ZWV3C+JNH9IGNq2KTmWQRJM7GW1dRzPj2augk7NVZSyyuBL7kB4mfaIRoNBxDPwFWuMWYVKFsinLkwhOReflc46F5EqPQTGAzwyGkLt9we4VtsSlRsDTjGFj/PuM/bg+gSzVRYlrXiDphTBFuYAqh+kn60agU6UvlGGtkiY3OfQcZIi8HStg88QNMdnkMhM+LqY9xSFmeHJ1C29FOJZydE14g0TYhOsLLCA/Zs= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f696517-ce7a-432e-787e-08d6a604700b X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2019 09:32:11.4167 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6566 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hou Zhiqiang Allow CFG transactions to all functions of Endpoint implemented multiple functions. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian --- V4: - Split the link up check to the 18th patch drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c b/drivers= /pci/controller/mobiveil/pcie-mobiveil-host.c index dc5324d94466..74a14f05115e 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c @@ -37,7 +37,7 @@ static bool mobiveil_pcie_valid_device(struct pci_bus *bu= s, unsigned int devfn) * Do not read more than one device on the bus directly * attached to RC */ - if ((bus->primary =3D=3D pcie->rp.root_bus_nr) && (devfn > 0)) + if ((bus->primary =3D=3D pcie->rp.root_bus_nr) && (PCI_SLOT(devfn) > 0)) return false; =20 return true; --=20 2.17.1