[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dmidecode] [PATCH] dmioem: Nicer display of PCI device (HPE type 23
From: |
Jerry Hoemann |
Subject: |
Re: [dmidecode] [PATCH] dmioem: Nicer display of PCI device (HPE type 238) |
Date: |
Thu, 2 Jun 2022 08:26:58 -0600 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Wed, Jun 01, 2022 at 10:06:15AM +0200, Jean Delvare wrote:
> Use the standard PCI device format (bus:dev.fn) to designate the
> parent PCI device of the USB port, so it is much easier to lookup
> in the output of lspci for example.
>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Jerry Hoemann <jerry.hoemann@hpe.com>
Looks good.
Reviewed-by: Jerry Hoemann <jerry.hoemann@hpe.com>
> ---
> Jerry, what do you think? This would make the PCI device presentation
> consistent with what we do for type 203.
>
> dmioem.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> --- dmidecode.orig/dmioem.c 2022-06-01 09:52:29.238550207 +0200
> +++ dmidecode/dmioem.c 2022-06-01 09:57:30.181528594 +0200
> @@ -666,9 +666,8 @@ static int dmi_decode_hp(const struct dm
> if (h->length < 0x0F) break;
> if (!(opt.flags & FLAG_QUIET))
> pr_attr("Associated Handle", "0x%04X",
> WORD(data + 0x4));
> - pr_attr("PCI Bus of Parent USB", "0x%04X", data[0x6]);
> - pr_attr("PCI Device of Parent USB", "0x%04X", data[0x7]
> >> 3);
> - pr_attr("PCI Function of Parent USB", "0x%04X",
> data[0x7] & 0x7);
> + pr_attr("PCI Device", "%02x:%02x.%x", data[0x6],
> + data[0x7] >> 3, data[0x7] & 0x7);
> dmi_hp_238_loc("Location", data[0x8]);
> dmi_hp_238_flags("Management Port", WORD(data + 0x9));
> pr_attr("Port Instance", "%d", data[0xB]);
>
>
> --
> Jean Delvare
> SUSE L3 Support
--
-----------------------------------------------------------------------------
Jerry Hoemann Software Engineer Hewlett Packard Enterprise
-----------------------------------------------------------------------------