@@ -2698,7 +2698,7 @@ static bool get_dev_mgment_data(nvme_root_t r, struct nvme_dev *dev,
26982698 (wdc_is_sn640_3 (device_id ) || wdc_is_sn655 (device_id )))
26992699 uuid_index = nvme_uuid_find (& uuid_list , WDC_UUID_SN640_3 );
27002700
2701- if (uuid_index > 0 )
2701+ if (uuid_index >= 0 )
27022702 found = get_dev_mgmt_log_page_data (dev , data , uuid_index );
27032703 } else if (needs_c2_log_page_check (device_id )) {
27042704 /* In certain devices that don't support UUID lists, there are multiple
@@ -2718,6 +2718,10 @@ static bool get_dev_mgment_data(nvme_root_t r, struct nvme_dev *dev,
27182718
27192719 found = get_dev_mgmt_log_page_data (dev , data , uuid_index );
27202720 }
2721+ } else {
2722+ /* Default to uuid-index 0 for cases where UUID lists are not supported */
2723+ uuid_index = 0 ;
2724+ found = get_dev_mgmt_log_page_data (dev , data , uuid_index );
27212725 }
27222726
27232727 return found ;
@@ -2752,13 +2756,9 @@ static bool get_dev_mgment_cbs_data(nvme_root_t r, struct nvme_dev *dev,
27522756 uuid_index = nvme_uuid_find (& uuid_list , WDC_UUID_SN640_3 );
27532757 }
27542758
2755- if (uuid_index > 0 )
2759+ if (uuid_index >= 0 )
27562760 found = get_dev_mgmt_log_page_lid_data (dev , cbs_data , lid ,
27572761 log_id , uuid_index );
2758-
2759- } else if (wdc_is_zn350 (device_id )) {
2760- uuid_index = 0 ;
2761- found = get_dev_mgmt_log_page_lid_data (dev , cbs_data , lid , log_id , uuid_index );
27622762 } else if (needs_c2_log_page_check (device_id )) {
27632763 /* In certain devices that don't support UUID lists, there are multiple
27642764 * definitions of the C2 logpage. In those cases, the code
@@ -2776,6 +2776,10 @@ static bool get_dev_mgment_cbs_data(nvme_root_t r, struct nvme_dev *dev,
27762776 found = get_dev_mgmt_log_page_lid_data (dev , cbs_data , lid , log_id ,
27772777 uuid_index );
27782778 }
2779+ } else {
2780+ /* Default to uuid-index 0 for cases where UUID lists are not supported */
2781+ uuid_index = 0 ;
2782+ found = get_dev_mgmt_log_page_lid_data (dev , cbs_data , lid , log_id , uuid_index );
27792783 }
27802784
27812785 return found ;
0 commit comments