Fall back to pci-ids if FRU product_name is empty

rocm-smi --showproductname will not show "Card series" in its output if
product_name exported by Kernel is empty string. This has been raised a
regression by customer.

BUG: SWDEV-297228

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I9aae24778e2d3a30aa661d8f338278c1666590fb
(cherry picked from commit 7a8c3f3629)
Tento commit je obsažen v:
Harish Kasiviswanathan authored and Shuzhou Liu committed 2021-08-13 09:27:46 -04:00
1 rodič 5d3f3a19a7
revize b9cc3d1a44
1 file changed
+1 -1
+1 -1
Zobrazit soubor
@@ -1852,7 +1852,7 @@ rsmi_dev_name_get(uint32_t dv_ind, char *name, size_t len) {
ret = get_dev_name_from_file(dv_ind, name, len);
if (ret) {
if (ret || name[0] == '\0') {
ret = get_dev_name_from_id(dv_ind, name, len, NAME_STR_DEVICE);
}