Skip to content

Commit c0da9a5

Browse files
jeff-lien-sndkigaw
authored andcommitted
plugin/wdc: Fix UUID search for SN640 and SN655
The current code is checking both the pci device id and UUID. The pci device id check is not required and causes this check to fail in nvme over fabrics cases so it was removed. Signed-off-by: jeff-lien-sndk <[email protected]> Reviewed-by: brandon-paupore-sndk <[email protected]>
1 parent 7dc37f7 commit c0da9a5

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

plugins/wdc/wdc-nvme.c

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,14 +1582,6 @@ static bool wdc_is_sn640(__u32 device_id)
15821582
return false;
15831583
}
15841584

1585-
static bool wdc_is_sn640_3(__u32 device_id)
1586-
{
1587-
if (device_id == WDC_NVME_SN640_DEV_ID_3)
1588-
return true;
1589-
else
1590-
return false;
1591-
}
1592-
15931585
static bool wdc_is_sn650_u2(__u32 device_id)
15941586
{
15951587
if (device_id == WDC_NVME_SN650_DEV_ID_3)
@@ -1606,14 +1598,6 @@ static bool wdc_is_sn650_e1l(__u32 device_id)
16061598
return false;
16071599
}
16081600

1609-
static bool wdc_is_sn655(__u32 device_id)
1610-
{
1611-
if (device_id == WDC_NVME_SN655_DEV_ID)
1612-
return true;
1613-
else
1614-
return false;
1615-
}
1616-
16171601
static bool wdc_is_zn350(__u32 device_id)
16181602
{
16191603
return (device_id == WDC_NVME_ZN350_DEV_ID ||
@@ -2757,8 +2741,7 @@ static bool get_dev_mgment_data(struct nvme_global_ctx *ctx, struct nvme_transpo
27572741
* check for the WDC UUID second.
27582742
*/
27592743
uuid_index = nvme_uuid_find(&uuid_list, WDC_UUID);
2760-
if (uuid_index < 0 &&
2761-
(wdc_is_sn640_3(device_id) || wdc_is_sn655(device_id)))
2744+
if (uuid_index < 0)
27622745
uuid_index = nvme_uuid_find(&uuid_list, WDC_UUID_SN640_3);
27632746
}
27642747

@@ -2827,8 +2810,7 @@ static bool get_dev_mgment_cbs_data(struct nvme_global_ctx *ctx, struct nvme_tra
28272810
* check for the WDC UUID second.
28282811
*/
28292812
uuid_index = nvme_uuid_find(&uuid_list, WDC_UUID);
2830-
if (uuid_index < 0 &&
2831-
(wdc_is_sn640_3(device_id) || wdc_is_sn655(device_id)))
2813+
if (uuid_index < 0)
28322814
uuid_index = nvme_uuid_find(&uuid_list, WDC_UUID_SN640_3);
28332815
}
28342816

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.6"
8+
#define WDC_PLUGIN_VERSION "2.14.7"
99
#include "cmd.h"
1010

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

0 commit comments

Comments
 (0)