@@ -24,6 +24,12 @@ static const __u8 WDC_UUID[NVME_UUID_LEN] = {
2424 0xab , 0xe6 , 0x33 , 0x29 , 0x9a , 0x70 , 0xdf , 0xd0
2525};
2626
27+ /* WDC_UUID value for SN640_3 devices and SN655 devices */
28+ static const __u8 WDC_UUID_SN640_3 [NVME_UUID_LEN ] = {
29+ 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 ,
30+ 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22
31+ };
32+
2733/* Sandisk UUID value */
2834static const __u8 SNDK_UUID [NVME_UUID_LEN ] = {
2935 0xde , 0x87 , 0xd1 , 0xeb , 0x72 , 0xc5 , 0x58 , 0x0b ,
@@ -334,6 +340,9 @@ bool sndk_get_dev_mgment_data(struct nvme_global_ctx *ctx, struct nvme_transport
334340 * check for the WDC UUID second.
335341 */
336342 uuid_index = nvme_uuid_find (& uuid_list , WDC_UUID );
343+ if (uuid_index < 0 )
344+ /* Check for the UUID used on SN640 and SN655 drives */
345+ uuid_index = nvme_uuid_find (& uuid_list , WDC_UUID_SN640_3 );
337346 }
338347
339348 if (uuid_index >= 0 )
@@ -671,11 +680,15 @@ __u64 sndk_get_enc_drive_capabilities(struct nvme_global_ctx *ctx,
671680 /* check for the Sandisk UUID first */
672681 uuid_index = nvme_uuid_find (& uuid_list , SNDK_UUID );
673682
674- if (uuid_index < 0 )
683+ if (uuid_index < 0 ) {
675684 /* The Sandisk UUID is not found;
676685 * check for the WDC UUID second.
677686 */
678687 uuid_index = nvme_uuid_find (& uuid_list , WDC_UUID );
688+ if (uuid_index < 0 )
689+ /* Check for the UUID used on SN640 and SN655 drives */
690+ uuid_index = nvme_uuid_find (& uuid_list , WDC_UUID_SN640_3 );
691+ }
679692 } else {
680693 /* UUID Lists not supported, Use default uuid index - 0 */
681694 fprintf (stderr , "INFO: SNDK: %s: UUID Lists not supported\n" ,
@@ -718,6 +731,11 @@ __u64 sndk_get_enc_drive_capabilities(struct nvme_global_ctx *ctx,
718731 (void * )& drive_form_factor ))
719732 fprintf (stderr , "ERROR: SNDK: Getting Form Factor Failed\n" );
720733
734+ /* verify the 0xC0 log page is supported */
735+ if (run_wdc_nvme_check_supported_log_page (ctx , hdl ,
736+ SNDK_NVME_GET_SMART_CLOUD_ATTR_LOG_ID , 0 ))
737+ capabilities |= SNDK_DRIVE_CAP_C0_LOG_PAGE ;
738+
721739 /* verify the 0xC3 log page is supported */
722740 if (run_wdc_nvme_check_supported_log_page (ctx , hdl ,
723741 SNDK_LATENCY_MON_LOG_ID , 0 ))
@@ -753,11 +771,6 @@ __u64 sndk_get_enc_drive_capabilities(struct nvme_global_ctx *ctx,
753771 SNDK_DRIVE_CAP_VU_FID_CLEAR_FW_ACT_HISTORY |
754772 SNDK_DRIVE_CAP_VU_FID_CLEAR_PCIE );
755773
756- /* verify the 0xC0 log page is supported */
757- if (run_wdc_nvme_check_supported_log_page (ctx , hdl ,
758- SNDK_LATENCY_MON_LOG_ID , 0 ))
759- capabilities |= SNDK_DRIVE_CAP_C0_LOG_PAGE ;
760-
761774 if ((drive_form_factor == SNDK_C2_FORM_FACTOR_SFF_U2 ) ||
762775 (drive_form_factor == SNDK_C2_FORM_FACTOR_EDSFF_E3S ))
763776 capabilities |= SNDK_DRIVE_CAP_RESIZE_SN861 ;
0 commit comments