Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions plugins/wdc/wdc-nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -2698,7 +2698,7 @@ static bool get_dev_mgment_data(nvme_root_t r, struct nvme_dev *dev,
(wdc_is_sn640_3(device_id) || wdc_is_sn655(device_id)))
uuid_index = nvme_uuid_find(&uuid_list, WDC_UUID_SN640_3);

if (uuid_index > 0)
if (uuid_index >= 0)
found = get_dev_mgmt_log_page_data(dev, data, uuid_index);
} else if (needs_c2_log_page_check(device_id)) {
/* In certain devices that don't support UUID lists, there are multiple
Expand All @@ -2718,6 +2718,10 @@ static bool get_dev_mgment_data(nvme_root_t r, struct nvme_dev *dev,

found = get_dev_mgmt_log_page_data(dev, data, uuid_index);
}
} else {
/* Default to uuid-index 0 for cases where UUID lists are not supported */
uuid_index = 0;
found = get_dev_mgmt_log_page_data(dev, data, uuid_index);
}

return found;
Expand Down Expand Up @@ -2752,13 +2756,9 @@ static bool get_dev_mgment_cbs_data(nvme_root_t r, struct nvme_dev *dev,
uuid_index = nvme_uuid_find(&uuid_list, WDC_UUID_SN640_3);
}

if (uuid_index > 0)
if (uuid_index >= 0)
found = get_dev_mgmt_log_page_lid_data(dev, cbs_data, lid,
log_id, uuid_index);

} else if (wdc_is_zn350(device_id)) {
uuid_index = 0;
found = get_dev_mgmt_log_page_lid_data(dev, cbs_data, lid, log_id, uuid_index);
} else if (needs_c2_log_page_check(device_id)) {
/* In certain devices that don't support UUID lists, there are multiple
* definitions of the C2 logpage. In those cases, the code
Expand All @@ -2776,6 +2776,10 @@ static bool get_dev_mgment_cbs_data(nvme_root_t r, struct nvme_dev *dev,
found = get_dev_mgmt_log_page_lid_data(dev, cbs_data, lid, log_id,
uuid_index);
}
} else {
/* Default to uuid-index 0 for cases where UUID lists are not supported */
uuid_index = 0;
found = get_dev_mgmt_log_page_lid_data(dev, cbs_data, lid, log_id, uuid_index);
}

return found;
Expand Down
2 changes: 1 addition & 1 deletion plugins/wdc/wdc-nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#if !defined(WDC_NVME) || defined(CMD_HEADER_MULTI_READ)
#define WDC_NVME

#define WDC_PLUGIN_VERSION "2.14.3"
#define WDC_PLUGIN_VERSION "2.14.4"
#include "cmd.h"

PLUGIN(NAME("wdc", "Western Digital vendor specific extensions", WDC_PLUGIN_VERSION),
Expand Down