From 43e241fbda8e6c137142af8d08abf9f8d16c5145 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 20 Jun 2024 06:06:28 +0200 Subject: Merging upstream version 1:3.13.0. Signed-off-by: Daniel Baumann --- lib/sysfs.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/sysfs.c') diff --git a/lib/sysfs.c b/lib/sysfs.c index 0e763dc..7dedc0b 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -2,7 +2,7 @@ * The PCI Library -- Configuration Access via /sys/bus/pci * * Copyright (c) 2003 Matthew Wilcox - * Copyright (c) 1997--2023 Martin Mares + * Copyright (c) 1997--2024 Martin Mares * * Can be freely distributed and used under the terms of the GNU GPL v2+. * @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "internal.h" @@ -483,6 +484,17 @@ sysfs_fill_info(struct pci_dev *d, unsigned int flags) clear_fill(d, PCI_FILL_DRIVER); } + if (want_fill(d, flags, PCI_FILL_RCD_LNK)) + { + char buf[OBJBUFSIZE]; + if (sysfs_get_string(d, "rcd_link_cap", buf, 0)) + d->rcd_link_cap = strtoul(buf, NULL, 16); + if (sysfs_get_string(d, "rcd_link_ctrl", buf, 0)) + d->rcd_link_ctrl = strtoul(buf, NULL, 16); + if (sysfs_get_string(d, "rcd_link_status", buf, 0)) + d->rcd_link_status = strtoul(buf, NULL, 16); + } + pci_generic_fill_info(d, flags); } -- cgit v1.2.3