UINT8 Index;\r
UINT8 MaxRetry;\r
\r
- SenseDataLength = 0;\r
+ SenseDataLength = (UINT8) (ScsiDiskDevice->SenseDataNumber * sizeof (EFI_SCSI_SENSE_DATA));\r
*NumberOfSenseKeys = 0;\r
\r
//\r
Status = ScsiTestUnitReadyCommand (\r
ScsiDiskDevice->ScsiIo,\r
SCSI_DISK_TIMEOUT,\r
- NULL,\r
+ ScsiDiskDevice->SenseData,\r
&SenseDataLength,\r
&HostAdapterStatus,\r
&TargetStatus\r
return EFI_DEVICE_ERROR;\r
}\r
\r
+ if (SenseDataLength != 0) {\r
+ *NumberOfSenseKeys = SenseDataLength / sizeof (EFI_SCSI_SENSE_DATA);\r
+ *SenseDataArray = ScsiDiskDevice->SenseData;\r
+ return EFI_SUCCESS;\r
+ }\r
+\r
MaxRetry = 3;\r
for (Index = 0; Index < MaxRetry; Index++) {\r
Status = ScsiDiskRequestSenseKeys (\r
}\r
\r
ScsiDiskDevice->BlkIo.Media->MediaPresent = TRUE;\r
- \r
- if (ScsiDiskDevice->DeviceType == EFI_SCSI_TYPE_DISK) {\r
- ScsiDiskDevice->BlkIo.Media->BlockSize = 0x200;\r
- }\r
-\r
- if (ScsiDiskDevice->DeviceType == EFI_SCSI_TYPE_CDROM) {\r
- ScsiDiskDevice->BlkIo.Media->BlockSize = 0x800;\r
- }\r
}\r
\r
/**\r
EFI_STATUS Status;\r
SCSI_DISK_DEV *ScsiDiskDevice;\r
\r
- if (CompareGuid (&This->Interface, &gEfiDiskInfoScsiInterfaceGuid)) {\r
+ if (CompareGuid (&This->Interface, &gEfiDiskInfoScsiInterfaceGuid) || CompareGuid (&This->Interface, &gEfiDiskInfoUfsInterfaceGuid)) {\r
//\r
// Physical SCSI bus does not support this data class. \r
//\r
{\r
SCSI_DISK_DEV *ScsiDiskDevice;\r
\r
- if (CompareGuid (&This->Interface, &gEfiDiskInfoScsiInterfaceGuid)) {\r
+ if (CompareGuid (&This->Interface, &gEfiDiskInfoScsiInterfaceGuid) || CompareGuid (&This->Interface, &gEfiDiskInfoUfsInterfaceGuid)) {\r
//\r
// This is not an IDE physical device.\r
//\r
return;\r
}\r
} while (--IdentifyRetry > 0);\r
+ } else if ((DevicePathType (ChildDevicePathNode) == MESSAGING_DEVICE_PATH) &&\r
+ (DevicePathSubType (ChildDevicePathNode) == MSG_UFS_DP)) {\r
+ CopyGuid (&ScsiDiskDevice->DiskInfo.Interface, &gEfiDiskInfoUfsInterfaceGuid);\r
+ break;\r
}\r
DevicePathNode = ChildDevicePathNode;\r
}\r