From patchwork Fri Mar 1 05:02:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10834463 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6373F1399 for ; Fri, 1 Mar 2019 05:02:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E6AC2F728 for ; Fri, 1 Mar 2019 05:02:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41A252F72A; Fri, 1 Mar 2019 05:02:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EB7162F728 for ; Fri, 1 Mar 2019 05:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:Message-ID:Date :Subject:To:From:Reply-To:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3PNSqrGvmAZr7zQ+BLyii/B9USDPkazTms+dJ9oWxFs=; b=e9u/kYOOHQOZAJ Esdn9DBAkb/H23rt+04W3uL3jpCx4RmHiaURKqEW9ze01XFGFVWHHQgJTWpJFxnrJAPtKQ1GO+eRC yzBvxsHjFwkbAE7rSmqqYW3Vrm+9eIftLhvCq1XjMS8pYupg0YDVfLxj2aANKM+VFWMiwAhsWwZ+1 7wDTWp9xSs+LTkg+qGUzUE1QUcd/4qjxYDgNRU+CZhV/FMPZCY98HaPobm2qVkQtdy5BAG+vZ7Mcp Mbh5nZv9dzErICLr7/6EH8wP54zoU1l3ZcYtuu4GQ1rZbqhHGwhPsMVcnkZUTUqPw5EG5J5r/Kt95 LyS/QTXHdnQoFV78jr8Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzaJW-0006Xj-Bx; Fri, 01 Mar 2019 05:02:26 +0000 Received: from mail-sn1nam04on0608.outbound.protection.outlook.com ([2a01:111:f400:fe4c::608] helo=NAM04-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzaJS-0006X6-VO for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2019 05:02:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pjk8U/3sBYrKhekX4hroCjYXMnz/EbUE3OGOtIQqDiA=; b=dcxWi/9fXD7bHVJkdzYteLl5Dsh2cHQ2TqV54T3cOI4WQZlvoXfDvFf2tbOp7s59dD7FuaCRmvgqL9+qgDJ4Wl3IojiBfnTteOQHTeKhDuwnF/BJsJOMcppU17gB+nA2dd2/7HvrveDNutX2zP6hZYnKdeI4gfI7jHg8ukHvUnc= Received: from BYAPR03MB4773.namprd03.prod.outlook.com (20.179.92.152) by BYAPR03MB4533.namprd03.prod.outlook.com (20.178.50.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.15; Fri, 1 Mar 2019 05:02:17 +0000 Received: from BYAPR03MB4773.namprd03.prod.outlook.com ([fe80::1cca:e5f5:d31d:1e5c]) by BYAPR03MB4773.namprd03.prod.outlook.com ([fe80::1cca:e5f5:d31d:1e5c%5]) with mapi id 15.20.1665.015; Fri, 1 Mar 2019 05:02:17 +0000 From: Jisheng Zhang To: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Bjorn Helgaas Subject: [PATCH v2 0/5] PCI: dwc: Support remove Thread-Topic: [PATCH v2 0/5] PCI: dwc: Support remove Thread-Index: AQHUz+vxPcDv5Ll8t0yCbZJv4RtGhA== Date: Fri, 1 Mar 2019 05:02:17 +0000 Message-ID: <20190301125510.4e2ee985@xhacker.debian> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [199.33.119.15] x-clientproxiedby: TY2PR02CA0044.apcprd02.prod.outlook.com (2603:1096:404:a6::32) To BYAPR03MB4773.namprd03.prod.outlook.com (2603:10b6:a03:134::24) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 143c423c-967c-4455-5049-08d69e0313c9 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:BYAPR03MB4533; x-ms-traffictypediagnostic: BYAPR03MB4533: x-microsoft-exchange-diagnostics: =?us-ascii?Q?1; BYAPR03MB4533; 23:M1q4HDMd311iszqj2nFnpzHO7HiyUedWnyaG4X9XM?= RUGogK3iYIIHP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9veuPseevlbuJVQjOMF0gUe6vksM36ZXs7JjOvfxJRuO6KdFgqd+4PKsfjWY2tbMRn1pTtPg9ciO+VlX5byU6lZLHszLkz7 x-microsoft-antispam-prvs: x-forefront-prvs: 09634B1196 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39860400002)(396003)(136003)(376002)(199004)(189003)(86362001)(316002)(97736004)(6486002)(66066001)(25786009)(4326008)(68736007)(102836004)(50226002)(4744005)(5660300002)(476003)(6436002)(2906002)(54906003)(1076003)(9686003)(106356001)(7736002)(386003)(8936002)(3846002)(14454004)(71200400001)(478600001)(71190400001)(186003)(81166006)(81156014)(6116002)(72206003)(256004)(305945005)(52116002)(53936002)(110136005)(26005)(8676002)(99286004)(486006)(6506007)(6512007)(105586002)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR03MB4533; H:BYAPR03MB4773.namprd03.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:1; received-spf: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: I6WpZPKdSm4GsRvHon9KnR59EHCA275j0sDBbSUbE+jaiMMxMTNZKZMuXRvet8RDNg2jVoXDi3FRzuDgXoY0HzWd2GUD3fPCunjAKa9FrBrITDNRMHQG4TNzjLc7VPMe6e0Kvsz0lmrAeItQPxsj/gpW5PsoGjzPurrh2TiL7Kz5ozcW2Xhsm7DlZprORRTPnEtXjb2RU4FSfFXrr4rx3pbk4psG/MJK2QypHmuEDW6H40zuxHmpFdZbwYdN657Kteu/vp+Nb19e3iNZxo3gxP5wnyNekiAhdr+spmzktIB2lu+a8C9NZRn0/Fa+HKig1sTx8evYVBFUtdB4zYUHZe/ogmfrqvSdRWxE2CDxaCh5QzUUvl8RDzBu4MxTN4DFiNFUe4QsgtiQY7IFKPTtV34x2sW1oF5LPxN1g+rf3bI= Content-ID: <6AD9ADDA9579594AB28C290C7E143702@namprd03.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 143c423c-967c-4455-5049-08d69e0313c9 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2019 05:02:17.7527 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR03MB4533 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190228_210223_015740_A7CB20E0 X-CRM114-Status: UNSURE ( 7.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, the PCI dwc host users don't support the remove, but nothing prevent us from supporting it. To achieve this goal, we need to ensure we can do necessary clean up work. Changes since v1: - address Bjorn's comments, I.E Capitalize, s/irq/IRQ/, s/msi/MSI/ Jisheng Zhang (5): PCI: dwc: Fix dw_pcie_free_msi() if msi_irq is invalid PCI: dwc: Free the page for MSI IRQ in dw_pcie_free_msi() PCI: dwc: Free MSI in the error code path of dw_pcie_host_init() PCI: dwc: Use devm_pci_alloc_host_bridge() to simplify the code PCI: dwc: Save root bus for driver remove .../pci/controller/dwc/pcie-designware-host.c | 38 ++++++++++--------- drivers/pci/controller/dwc/pcie-designware.h | 2 + 2 files changed, 23 insertions(+), 17 deletions(-)