Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5654989pxu; Thu, 22 Oct 2020 07:55:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvJNsBZyGpSjD1UwCdMOV6n6xKbWKhOVcOnOBMYd8PeEeKKWmruHYVQ3bIDTXDN55kHzzk X-Received: by 2002:a17:906:400b:: with SMTP id v11mr2526350ejj.421.1603378553140; Thu, 22 Oct 2020 07:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603378553; cv=none; d=google.com; s=arc-20160816; b=f9/CPo1NpXSsHaiqwFStVtZFUhprIYaGBlLgOVK1+w3MYsMZ4SeD7ZsxtIVtk7YPSF rGqGcHnKJ0afUWDehgR0+guF4gqerGirRoDEEJJ0XbSrfLZeeSAw6Fp3EBTYj618eNEo 3l4n/37Yho9pGXg+BqitmJ4VbtPbWfB/Odg48Lmstqh3jXzNSv+W6C/LnCczW6fEi6RR nKUhs89ICbV2wIU2RL7XPkKrDUeggKGe1A7ANGjfh+IZ6+3zY/xC7s3Fh4GJ34lo5Jpd hKejjm3e0UiDHYNuuER0Y9+ODwQDjABMdIBm5FV1h9Vt+9vpNUrIrOxO+ukOvgHzHnUp mMyA== 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 :message-id:date:subject:to:from; bh=okISTOsYz2btZzU9EZ3sAEwl3uE0O7RDePzOZCmsXRY=; b=WCpGiEgVD3SJg7GQKI5es2fgTENGD/V2u6BlRfcbYm1nlpBpJ0RdErBYJVAgSHKlGN hz2sjoj9tm1PWG79Cs+kXv8/q7ylLNIr3DdejeUjYCWRkjDe6dM4xI+8qFSy9xDn3+K5 /rcjmwnmagrJSn0gnF0mR1hzWsOf++Pg/Grjt8v089emhSQI9tpDVKdAISwKKt40KSxQ AXdG4YzHFB98Yi6AH602V1caWf5PrBknJxzi0mO9D0bfaqE+ZBh6Bze5qc+37YuMnMUE aQKmYO3XsambLn17cNwxDcqY3DjZlHZC6Bs6/IWfIQZWq+V3KWnoM71O76PPwa6XlFoD wGMQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si1233776ejm.502.2020.10.22.07.55.31; Thu, 22 Oct 2020 07:55:53 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504241AbgJVGkx (ORCPT + 99 others); Thu, 22 Oct 2020 02:40:53 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:48877 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504237AbgJVGkw (ORCPT ); Thu, 22 Oct 2020 02:40:52 -0400 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kVUHK-0003qB-Ft; Thu, 22 Oct 2020 06:40:51 +0000 From: kaichuan.hsieh@canonical.com To: jdelvare@suse.com, linux-kernel@vger.kernel.org Subject: [PATCH] firmware/dmi: Include product_sku info to modalias Date: Thu, 22 Oct 2020 14:40:47 +0800 Message-Id: <20201022064047.9827-1-kaichuan.hsieh@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kai-Chuan Hsieh Some Dell platforms rely on modalias to customize configuration, the product sku can be more specific for the hardware. Add product_sku to modalias for better utilization. Signed-off-by: Kai-Chuan Hsieh --- drivers/firmware/dmi-id.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c index 86d71b0212b1..26eb01da5392 100644 --- a/drivers/firmware/dmi-id.c +++ b/drivers/firmware/dmi-id.c @@ -77,21 +77,22 @@ static ssize_t get_modalias(char *buffer, size_t buffer_size) const char *prefix; int field; } fields[] = { - { "bvn", DMI_BIOS_VENDOR }, - { "bvr", DMI_BIOS_VERSION }, - { "bd", DMI_BIOS_DATE }, - { "br", DMI_BIOS_RELEASE }, - { "efr", DMI_EC_FIRMWARE_RELEASE }, - { "svn", DMI_SYS_VENDOR }, - { "pn", DMI_PRODUCT_NAME }, - { "pvr", DMI_PRODUCT_VERSION }, - { "rvn", DMI_BOARD_VENDOR }, - { "rn", DMI_BOARD_NAME }, - { "rvr", DMI_BOARD_VERSION }, - { "cvn", DMI_CHASSIS_VENDOR }, - { "ct", DMI_CHASSIS_TYPE }, - { "cvr", DMI_CHASSIS_VERSION }, - { NULL, DMI_NONE } + { "bvn", DMI_BIOS_VENDOR }, + { "bvr", DMI_BIOS_VERSION }, + { "bd", DMI_BIOS_DATE }, + { "br", DMI_BIOS_RELEASE }, + { "efr", DMI_EC_FIRMWARE_RELEASE }, + { "svn", DMI_SYS_VENDOR }, + { "pn", DMI_PRODUCT_NAME }, + { "pvr", DMI_PRODUCT_VERSION }, + { "psku", DMI_PRODUCT_SKU }, + { "rvn", DMI_BOARD_VENDOR }, + { "rn", DMI_BOARD_NAME }, + { "rvr", DMI_BOARD_VERSION }, + { "cvn", DMI_CHASSIS_VENDOR }, + { "ct", DMI_CHASSIS_TYPE }, + { "cvr", DMI_CHASSIS_VERSION }, + { NULL, DMI_NONE } }; ssize_t l, left; -- 2.25.1