dmidecode-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dmidecode] OEM type 236 for HPe Gen10(+) servers


From: Jerry Hoemann
Subject: Re: [dmidecode] OEM type 236 for HPe Gen10(+) servers
Date: Fri, 6 Nov 2020 12:38:40 -0700

On Fri, Nov 06, 2020 at 10:44:13AM +0100, Erwan Velu wrote:
> Hi,
> I've been able to discuss with HPe around the type 236 which is very useful
> to decode how servers are connected to the Storage Box.
> They acknowledge we share this patch with the upstream project. We are
> pushing to get more OEM types being contributed as they are very useful.
> 
> This patch was written against 3.3 and was tested in production on Gen10+
> servers.
> 
> Therefore, I have an issue with this patch as I can't put it inside the HPe
> quirks.

Sorry, I don't understand.

Why can you not put this change inside of dmi_decode_hp()?



> The OEM type is read before the vendor. Do you know how I can workaround
> this ?
> 
> Cheers,
> Erwan,

> From 5b9c24c1bb78cb8ed0f355c174b9a0a8afb248a4 Mon Sep 17 00:00:00 2001
> From: Erwan Velu <e.velu@criteo.com>
> Date: Thu, 15 Oct 2020 22:37:18 +0200
> Subject: [PATCH] oem: Adding HPE ProLiant HDD Backplane (type 236)
> 
> HPE servers encodes some information about the HDD backplane into type 236.
> Therefore the handle is set before the vendor is detected.
> 
> This put the decoding under the unknown vendor which isn't really clean.
> 
> A typical output looks like:
>       # dmidecode 3.3
>       Getting SMBIOS data from sysfs.
>       SMBIOS 3.3.0 present.
> 
>       Handle 0x0019, DMI type 236, 21 bytes
>       OEM 0, type 236
>       HDD Backplane FRU Information
>               FRU I2C Address: 0xAE
>               Box Number: 2
>               NVRAM ID: 0x109
>               Sas Expander WWID: 0x0
>               Total SAS Bays: 4
> 
> Signed-off-by: Erwan Velu <e.velu@criteo.com>
> ---
>  dmioem.c | 39 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 
> diff --git a/dmioem.c b/dmioem.c
> index 60b667416563..f2ccd284ce04 100644
> --- a/dmioem.c
> +++ b/dmioem.c
> @@ -147,6 +147,43 @@ static void dmi_print_hp_net_iface_rec(u8 id, u8 bus, u8 
> dev, const u8 *mac)
>       }
>  }
>  
> +static int dmi_decode_unknown(const struct dmi_header *h)
> +{
> +     u8 *backplane, *data = h->data;
> +     const char *company = "Unknown";
> +     switch (h->type)
> +     {
> +             case 236:
> +                     /*
> +                      * Vendor Specific: HPE ProLiant HDD Backplane
> +                      *
> +                      *
> +                      * Offset |  Name      | Width | Description
> +                      * ---------------------------------------
> +                      *  0x00  | I2C Address| BYTE  | Backplane FRU I2C 
> Address
> +                      *  0x01  | Box Number | WORD  | Backplane Box Number
> +                      *  0x03  | NVRAM ID   | WORD  | Backplane NVRAM Id
> +                      *  0x05  | WWID       | 64B   | SAS Expander WWWID
> +                      *  0x0D  | Total Bays | WORD  | Total SAS Bays
> +                      */
> +                     pr_handle_name("%s HDD Backplane FRU Information", 
> company);
> +                     /* If the record isn't 0x15, that's suspicious
> +                      * */
> +                     if (h->length != 0x15) break;
> +                     backplane = data + 0x4;
> +                     pr_attr("FRU I2C Address", "0x%X", backplane[0x0]);
> +                     pr_attr("Box Number", "%d", WORD(backplane + 0x1));
> +                     pr_attr("NVRAM ID", "0x%X", WORD(backplane + 0x3));
> +                     pr_attr("Sas Expander WWID", "0x%X", QWORD(backplane + 
> 0x5));
> +                     pr_attr("Total SAS Bays", "%d", WORD(backplane + 0x0D));
> +                     break;
> +
> +             default:
> +                     return 0;
> +     }
> +     return 1;
> +}
> +
>  static int dmi_decode_hp(const struct dmi_header *h)
>  {
>       u8 *data = h->data;
> @@ -422,6 +459,8 @@ int dmi_decode_oem(const struct dmi_header *h)
>               case VENDOR_IBM:
>               case VENDOR_LENOVO:
>                       return dmi_decode_ibm_lenovo(h);
> +             case VENDOR_UNKNOWN:
> +                     return dmi_decode_unknown(h);
>               default:
>                       return 0;
>       }
> -- 
> 2.26.2
> 

> _______________________________________________
> https://lists.nongnu.org/mailman/listinfo/dmidecode-devel


-- 

-----------------------------------------------------------------------------
Jerry Hoemann                  Software Engineer   Hewlett Packard Enterprise
-----------------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]