Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5688211pxv; Wed, 21 Jul 2021 11:21:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG7tOuO6vFE8PNg5M+Zx8AUQ6KvsILoWmr7m1KvzXU/ETFsE/u4woBWdNFYL8N3jnq4fkt X-Received: by 2002:a6b:f91a:: with SMTP id j26mr28025458iog.97.1626891683495; Wed, 21 Jul 2021 11:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626891683; cv=none; d=google.com; s=arc-20160816; b=CJCRcpUufCyfCQzHClQHzN91YGUpuesyOgBb21Q5pA983Fth87Z9sb/lSDnexeLmWI ub22hYluHaZQMudYcu61v83/HHBPulTL6Q0ElurqRm859B+gcqKAkfj4KrRYv8MGQG3i g8QY2w2i4HRjqqPo+REJynBmriFGVpeC+ybfNyuoUiyxeonULHpM0u9GxZpiqtziuERc r3jNp1a7fGBxjpG6h7aeX8Hzi5IN4gtD0VziqyORp8yKvloCv7I2TKNcXUFLtjl/Emk6 LBYqa9l8UcQB/vVu2zR8sIE/RgedKcjJoA0cSXeShuZrZ0PlYKS23Xs98hQO02zZIYn5 BY8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=TZWdYGwz5NnYsN5Hc1HPv1KyIGAgPf4EvSSOfu75m+c=; b=PGRz153C8m/QxRmXoDV5FHhmmacct1A+Qs1qS3EAm/Sys1uNFlqMuhD7E7J11U0+cM jLqY9M64r1b73Q7AeGh6NNdKYoXbM211IybX9sf917OOmdb46aYei2he623xkk8Lx4Mk ZolM5wXJR2nxMGB/fhjM0CRFTebg0Evshf534ImJKbY8hDYW6LAg9F3TN4nQmA+MtCtb ZpRqOT5UhRC+H4unga1U8L3hPFtsV5Hmx1tUxGwYtDjGxsvI+btmBWkeqx0g1HCq+Dog +0PDtqNU8gRAx+hSJHbKcPnglz7y+6PV1WntV53lleM70PCg5VjW75qOZCcaBuurr4bY H1EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="U/z85Hx/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x14si27865797jab.2.2021.07.21.11.20.53; Wed, 21 Jul 2021 11:21:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="U/z85Hx/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237268AbhGUMaA (ORCPT + 99 others); Wed, 21 Jul 2021 08:30:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:60390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232286AbhGUM37 (ORCPT ); Wed, 21 Jul 2021 08:29:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 414AF6120A; Wed, 21 Jul 2021 13:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626873035; bh=RyTa6MIG32jq2CsXun6DRYMHVllwbaPN2b34PGmMn1M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=U/z85Hx/5xYT4WlwkQAIuVF+38cUNuHNXFEUE29SkU7anczFwcWnbr6GA7UJLib5+ aCvcEHN/7cYRm9D4/rV5wi8wUWQ3uSrRGE2AbfL0gPvHlNSAwpbR4CseZRwcnz9Ss5 z/z1zUwSwvbGXtiRQZOpX0LJnbPRUGu4k6xmqfYs5LWmbU+rYKv3K+G7U+rsgjWyMY j8hu8XVRfCIKrlAnCsPlQAIQm0eE2WLnrmxVKdRwTDLe2iWqtc4tjNlEVT/ZWDLxOO Pwqw+1HkDZg6rQoTHeDA9XiI0urXuaIaxHYdwkcvP0paJcKs3/P1sbbA+TFLmsJXI9 lUEKxG8qVGz6w== Date: Wed, 21 Jul 2021 15:10:29 +0200 From: Mauro Carvalho Chehab To: Arnd Bergmann Cc: Bjorn Helgaas , Linuxarm , Mauro Carvalho Chehab , Krzysztof =?UTF-8?B?V2ls?= =?UTF-8?B?Y3p5xYRza2k=?= , Alex Dewar , Henry Styles , Jaehoon Chung , Kevin Hilman , Lorenzo Pieralisi , Manivannan Sadhasivam , Paul Walmsley , Rob Herring , Wesley Sheng , Linux Kernel Mailing List , linux-pci Subject: Re: [PATCH v7 11/10] PCI: kirin: Allow building it as a module Message-ID: <20210721151029.29c84c57@coco.lan> In-Reply-To: References: <8dbdde3eda0e5d22020f6a8bf153d7cfb775c980.1626862458.git.mchehab+huawei@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, 21 Jul 2021 13:55:07 +0200 Arnd Bergmann escreveu: > On Wed, Jul 21, 2021 at 12:15 PM Mauro Carvalho Chehab > wrote: > > > > There's nothing preventing this driver to be loaded as a > > module. So, change its config from bool to tristate. > > > > Signed-off-by: Mauro Carvalho Chehab > > No objections from me, but I wonder if you would also consider making the > module removable. It's currently marked as 'builtin_platform_driver', > so you can load but not remove it. Rob has done some bug fixes that make > it possible to remove similar drivers, so it's probably not much work > here either. Yeah, I can probably work on a patch to unbind/remove this driver. Never actually tried to write a patch removing the PCIe BUS, so no idea if the refcounts for the in-board Ethernet NIC, M.2 and mini-PCIe slots will be properly handled. If refcount is handled properly, I guess a patch like that won't be hard, at least for Kirin 970 PHY. The Kirin 960 PHY will require a small change at the current version, as it currently misses the power_off logic. I also need to double-check if devm resources will be freed at the driver removal time, as, with some past tests with media devices, we had some issues with that. Thanks, Mauro