Skip to content

Commit 22ad43b

Browse files
jeff-lien-sndkigaw
authored andcommitted
wdc: Fix uuid-index setting for WD 0xC2 log page
Determine the current uuid-index value used for the WDC 0xC2 log page. update wdc plugin version to 2.14.3 Signed-off-by: jeff-lien-wdc <[email protected]>
1 parent cb44f48 commit 22ad43b

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

plugins/wdc/wdc-nvme.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,6 +1576,14 @@ static bool wdc_is_sn650_e1l(__u32 device_id)
15761576
return false;
15771577
}
15781578

1579+
static bool wdc_is_sn655(__u32 device_id)
1580+
{
1581+
if (device_id == WDC_NVME_SN655_DEV_ID)
1582+
return true;
1583+
else
1584+
return false;
1585+
}
1586+
15791587
static bool wdc_is_zn350(__u32 device_id)
15801588
{
15811589
return (device_id == WDC_NVME_ZN350_DEV_ID ||
@@ -2682,7 +2690,8 @@ static bool get_dev_mgment_data(nvme_root_t r, struct nvme_dev *dev,
26822690
memset(&uuid_list, 0, sizeof(struct nvme_id_uuid_list));
26832691
if (wdc_CheckUuidListSupport(dev, &uuid_list)) {
26842692
uuid_index = nvme_uuid_find(&uuid_list, WDC_UUID);
2685-
if (uuid_index < 0 && wdc_is_sn640_3(device_id))
2693+
if (uuid_index < 0 &&
2694+
(wdc_is_sn640_3(device_id) || wdc_is_sn655(device_id)))
26862695
uuid_index = nvme_uuid_find(&uuid_list, WDC_UUID_SN640_3);
26872696

26882697
if (uuid_index > 0)
@@ -2734,10 +2743,12 @@ static bool get_dev_mgment_cbs_data(nvme_root_t r, struct nvme_dev *dev,
27342743
memset(&uuid_list, 0, sizeof(struct nvme_id_uuid_list));
27352744
if (wdc_CheckUuidListSupport(dev, &uuid_list)) {
27362745
uuid_index = nvme_uuid_find(&uuid_list, WDC_UUID);
2737-
if (uuid_index < 0 && wdc_is_sn640_3(device_id))
2746+
if (uuid_index < 0 &&
2747+
(wdc_is_sn640_3(device_id) || wdc_is_sn655(device_id))) {
27382748
uuid_index = nvme_uuid_find(&uuid_list, WDC_UUID_SN640_3);
2749+
}
27392750

2740-
if (uuid_index < 0)
2751+
if (uuid_index > 0)
27412752
found = get_dev_mgmt_log_page_lid_data(dev, cbs_data, lid,
27422753
log_id, uuid_index);
27432754

plugins/wdc/wdc-nvme.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#if !defined(WDC_NVME) || defined(CMD_HEADER_MULTI_READ)
66
#define WDC_NVME
77

8-
#define WDC_PLUGIN_VERSION "2.14.2"
8+
#define WDC_PLUGIN_VERSION "2.14.3"
99
#include "cmd.h"
1010

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

0 commit comments

Comments
 (0)