Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751782AbdI1P57 (ORCPT ); Thu, 28 Sep 2017 11:57:59 -0400 Received: from mga05.intel.com ([192.55.52.43]:65315 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751664AbdI1P55 (ORCPT ); Thu, 28 Sep 2017 11:57:57 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,450,1500966000"; d="scan'208";a="1200081580" From: Jon Derrick Subject: Re: [RFC 2/3] module: Ignore delete_id parameter To: Dan Williams Cc: Greg Kroah-Hartman , Bjorn Helgaas , linux-pci@vger.kernel.org, "linux-kernel@vger.kernel.org" , Arjan van de Ven , Alan Cox References: <1506544822-2632-1-git-send-email-jonathan.derrick@intel.com> <1506544822-2632-3-git-send-email-jonathan.derrick@intel.com> Message-ID: <77cbeca1-c5a6-1fe0-d342-e248462eb3e9@intel.com> Date: Thu, 28 Sep 2017 09:57:56 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1324 Lines: 38 On 09/28/2017 12:03 AM, Dan Williams wrote: > On Wed, Sep 27, 2017 at 1:40 PM, Jon Derrick wrote: >> The PCI driver delete_id parameter is handled in each individual driver >> registration callback. >> >> Signed-off-by: Jon Derrick >> --- >> kernel/module.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/kernel/module.c b/kernel/module.c >> index de66ec8..2b2dccf 100644 >> --- a/kernel/module.c >> +++ b/kernel/module.c >> @@ -3620,6 +3620,13 @@ static int unknown_module_param_cb(char *param, char *val, const char *modname, >> return 0; >> } >> >> + /* >> + * Ignore driver delete list arguments. They are handled by driver >> + * registration callbacks >> + */ >> + if (strcmp(param, "delete_id") == 0) >> + return 0; >> + > > Does this preclude something like: > > modprobe ahci delete_id=1234:5678? > It does seem like it would. I can look into calling into the pci callback for this, but val is a struct module here and I haven't figured out the plumbing to get the [correct] driver from that. Maybe if I enforce the format of 'modprobe ahci ahci.delete_id=xxxx' to ensure the driver is specified (and would be required in cases with multi-driver modules).