Re: [PATCH] firmware/dmi: Include product_sku info to modalias
Hello Jean, Thanks for your reminder, I'll read the document for future submission. Sorry for not following the rule this time. Thanks, KaiChuan On 10/28/20 5:04 PM, Jean Delvare wrote: Hi Kai-Chuan, On Wed, 28 Oct 2020 11:50:15 +0800, Kai-Chuan Hsieh wrote: 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c index 86d71b0212b1..4d5421d14a41 100644 --- a/drivers/firmware/dmi-id.c +++ b/drivers/firmware/dmi-id.c @@ -85,6 +85,7 @@ static ssize_t get_modalias(char *buffer, size_t buffer_size) { "svn", DMI_SYS_VENDOR }, { "pn", DMI_PRODUCT_NAME }, { "pvr", DMI_PRODUCT_VERSION }, + { "sku", DMI_PRODUCT_SKU }, { "rvn", DMI_BOARD_VENDOR }, { "rn", DMI_BOARD_NAME }, { "rvr", DMI_BOARD_VERSION }, Applied, thanks. For your future submissions, I invite you to read Documentation/process/submitting-patches.rst Specifically, when submitting a new version of a patch, please: * Replace [PATCH] with [PATCH v2] in the subject. * Do not reply to the previous version of the patch, instead start a new thread. * Ideally, include a list of changes from previous version, between the "---" marker and the diffstat. Thanks,
[PATCH] firmware/dmi: Include product_sku info to modalias
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 | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c index 86d71b0212b1..4d5421d14a41 100644 --- a/drivers/firmware/dmi-id.c +++ b/drivers/firmware/dmi-id.c @@ -85,6 +85,7 @@ static ssize_t get_modalias(char *buffer, size_t buffer_size) { "svn", DMI_SYS_VENDOR }, { "pn", DMI_PRODUCT_NAME }, { "pvr", DMI_PRODUCT_VERSION }, + { "sku", DMI_PRODUCT_SKU }, { "rvn", DMI_BOARD_VENDOR }, { "rn", DMI_BOARD_NAME }, { "rvr", DMI_BOARD_VERSION }, -- 2.25.1
[PATCH] firmware/dmi: Include product_sku info to modalias
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 | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c index 86d71b0212b1..4d5421d14a41 100644 --- a/drivers/firmware/dmi-id.c +++ b/drivers/firmware/dmi-id.c @@ -85,6 +85,7 @@ static ssize_t get_modalias(char *buffer, size_t buffer_size) { "svn", DMI_SYS_VENDOR }, { "pn", DMI_PRODUCT_NAME }, { "pvr", DMI_PRODUCT_VERSION }, + { "sku", DMI_PRODUCT_SKU }, { "rvn", DMI_BOARD_VENDOR }, { "rn", DMI_BOARD_NAME }, { "rvr", DMI_BOARD_VERSION }, -- 2.25.1
[PATCH] firmware/dmi: Include product_sku info to modalias
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 | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c index 86d71b0212b1..4d5421d14a41 100644 --- a/drivers/firmware/dmi-id.c +++ b/drivers/firmware/dmi-id.c @@ -85,6 +85,7 @@ static ssize_t get_modalias(char *buffer, size_t buffer_size) { "svn", DMI_SYS_VENDOR }, { "pn", DMI_PRODUCT_NAME }, { "pvr", DMI_PRODUCT_VERSION }, + { "sku", DMI_PRODUCT_SKU }, { "rvn", DMI_BOARD_VENDOR }, { "rn", DMI_BOARD_NAME }, { "rvr", DMI_BOARD_VERSION }, -- 2.25.1
Re: [PATCH] firmware/dmi: Include product_sku info to modalias
Hi Kai-Chuan, On Wed, 28 Oct 2020 11:50:15 +0800, Kai-Chuan Hsieh wrote: > 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 | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c > index 86d71b0212b1..4d5421d14a41 100644 > --- a/drivers/firmware/dmi-id.c > +++ b/drivers/firmware/dmi-id.c > @@ -85,6 +85,7 @@ static ssize_t get_modalias(char *buffer, size_t > buffer_size) > { "svn", DMI_SYS_VENDOR }, > { "pn", DMI_PRODUCT_NAME }, > { "pvr", DMI_PRODUCT_VERSION }, > + { "sku", DMI_PRODUCT_SKU }, > { "rvn", DMI_BOARD_VENDOR }, > { "rn", DMI_BOARD_NAME }, > { "rvr", DMI_BOARD_VERSION }, Applied, thanks. For your future submissions, I invite you to read Documentation/process/submitting-patches.rst Specifically, when submitting a new version of a patch, please: * Replace [PATCH] with [PATCH v2] in the subject. * Do not reply to the previous version of the patch, instead start a new thread. * Ideally, include a list of changes from previous version, between the "---" marker and the diffstat. Thanks, -- Jean Delvare SUSE L3 Support
Re: [PATCH] firmware/dmi: Include product_sku info to modalias
Hi Kai-Chuan, On Thu, 22 Oct 2020 21:11:32 +0800, Kai-Chuan Hsieh wrote: > There are multiple product skus share the same product name, like > clamshell and 2-in-1 for Latitude series. > Both of them have 3-axis accelerator, but rotation is only disable for > clamshell model. > Originally, it should be descriminated by chassis_type, but found that > chassis_type is not trustful. > https://github.com/systemd/systemd/pull/17084#issuecomment-706931881 > Therefore, I would like to propose a change to include the product_sku > for applying customized configuration easier. OK. On the principle I'm fine with the change. As far as the implementation details go, I'd rather stick to 3 letters maximum as we did for other fields, to keep the overall string as short as possible. This also has the nice effect that you wouldn't need to realign everything, which would make the patch more readable too. So please go with either "sku" (my preference) or "psk". Thanks, -- Jean Delvare SUSE L3 Support
Re: [PATCH] firmware/dmi: Include product_sku info to modalias
Hello Jean, There are multiple product skus share the same product name, like clamshell and 2-in-1 for Latitude series. Both of them have 3-axis accelerator, but rotation is only disable for clamshell model. Originally, it should be descriminated by chassis_type, but found that chassis_type is not trustful. https://github.com/systemd/systemd/pull/17084#issuecomment-706931881 Therefore, I would like to propose a change to include the product_sku for applying customized configuration easier. Thanks, KaiChuan On 10/22/20 8:42 PM, Jean Delvare wrote: Hi Kai-Chuan, On Thu, 22 Oct 2020 14:40:47 +0800, kaichuan.hs...@canonical.com wrote: 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. Do you have an actual use case for this already, or is it a theoretical concern?
Re: [PATCH] firmware/dmi: Include product_sku info to modalias
Hi Kai-Chuan, On Thu, 22 Oct 2020 14:40:47 +0800, kaichuan.hs...@canonical.com wrote: > 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. Do you have an actual use case for this already, or is it a theoretical concern? -- Jean Delvare SUSE L3 Support
[PATCH] firmware/dmi: Include product_sku info to modalias
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