diff options
Diffstat (limited to '')
-rw-r--r-- | lib/sysfs.c | 14 |
1 files changed, 13 insertions, 1 deletions
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 <matthew@wil.cx> - * Copyright (c) 1997--2023 Martin Mares <mj@ucw.cz> + * Copyright (c) 1997--2024 Martin Mares <mj@ucw.cz> * * Can be freely distributed and used under the terms of the GNU GPL v2+. * @@ -19,6 +19,7 @@ #include <errno.h> #include <dirent.h> #include <fcntl.h> +#include <libgen.h> #include <sys/types.h> #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); } |