All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: xiehongyu1@kylinos.cn
Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: xhci: Add module param for compliance quirk checking
Date: Mon, 2 Dec 2024 07:38:11 +0100	[thread overview]
Message-ID: <2024120205-collected-trapezoid-9dde@gregkh> (raw)
In-Reply-To: <20241202031855.1319821-1-xiehongyu1@kylinos.cn>

On Mon, Dec 02, 2024 at 11:18:55AM +0800, xiehongyu1@kylinos.cn wrote:
> From: Hongyu Xie <xiehongyu1@kylinos.cn>
> 
> In the old way, vendor name and product name need to be put in
> xhci_compliance_mode_recovery_timer_quirk_check, it's not convenient.
> 
> So add two module param for convenience.

Please no.  Module parameters are from the 1990's, they do not scale or
work well anymore, please never add them.

> 
> usage: put xhci-hcd.compliance_vendor=[vendor name]
> xhci-hcd.compliance_product=[product name] in cmdline.
> 
> In Ubuntu you can use "dmidecode -t system" to get vendor name and
> product name.
> 
> Signed-off-by: Hongyu Xie <xiehongyu1@kylinos.cn>
> ---
>  drivers/usb/host/xhci.c | 18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 5ebde8cae4fc..2007c27bfaf4 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -39,6 +39,14 @@ static unsigned long long quirks;
>  module_param(quirks, ullong, S_IRUGO);
>  MODULE_PARM_DESC(quirks, "Bit flags for quirks to be enabled as default");
>  
> +static char *compliance_product;
> +module_param(compliance_product, charp, 0644);
> +MODULE_PARM_DESC(compliance_product, "Product name for compliance comparison");
> +
> +static char *compliance_vendor;
> +module_param(compliance_vendor, charp, 0644);
> +MODULE_PARM_DESC(compliance_vendor, "Vendor name for compliance comparison");

Also, you have provided no documentation as to why these are needed at
all, so that's not going to work :(

thanks,

greg k-h

  reply	other threads:[~2024-12-02  6:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02  3:18 [PATCH] usb: xhci: Add module param for compliance quirk checking xiehongyu1
2024-12-02  6:38 ` Greg KH [this message]
2024-12-03  0:30   ` xiehongyu1
2024-12-04 14:55     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024120205-collected-trapezoid-9dde@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=xiehongyu1@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.