diff options
-rw-r--r-- | MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 26 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf | 1 |
2 files changed, 15 insertions, 12 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c index 21da985dd4..e7abe544df 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c @@ -1150,7 +1150,7 @@ ScsiDiskTestUnitReady ( UINT8 Index;
UINT8 MaxRetry;
- SenseDataLength = 0;
+ SenseDataLength = (UINT8) (ScsiDiskDevice->SenseDataNumber * sizeof (EFI_SCSI_SENSE_DATA));
*NumberOfSenseKeys = 0;
//
@@ -1159,7 +1159,7 @@ ScsiDiskTestUnitReady ( Status = ScsiTestUnitReadyCommand (
ScsiDiskDevice->ScsiIo,
SCSI_DISK_TIMEOUT,
- NULL,
+ ScsiDiskDevice->SenseData,
&SenseDataLength,
&HostAdapterStatus,
&TargetStatus
@@ -1207,6 +1207,12 @@ ScsiDiskTestUnitReady ( return EFI_DEVICE_ERROR;
}
+ if (SenseDataLength != 0) {
+ *NumberOfSenseKeys = SenseDataLength / sizeof (EFI_SCSI_SENSE_DATA);
+ *SenseDataArray = ScsiDiskDevice->SenseData;
+ return EFI_SUCCESS;
+ }
+
MaxRetry = 3;
for (Index = 0; Index < MaxRetry; Index++) {
Status = ScsiDiskRequestSenseKeys (
@@ -1740,14 +1746,6 @@ GetMediaInfo ( }
ScsiDiskDevice->BlkIo.Media->MediaPresent = TRUE;
-
- if (ScsiDiskDevice->DeviceType == EFI_SCSI_TYPE_DISK) {
- ScsiDiskDevice->BlkIo.Media->BlockSize = 0x200;
- }
-
- if (ScsiDiskDevice->DeviceType == EFI_SCSI_TYPE_CDROM) {
- ScsiDiskDevice->BlkIo.Media->BlockSize = 0x800;
- }
}
/**
@@ -3102,7 +3100,7 @@ ScsiDiskInfoIdentify ( EFI_STATUS Status;
SCSI_DISK_DEV *ScsiDiskDevice;
- if (CompareGuid (&This->Interface, &gEfiDiskInfoScsiInterfaceGuid)) {
+ if (CompareGuid (&This->Interface, &gEfiDiskInfoScsiInterfaceGuid) || CompareGuid (&This->Interface, &gEfiDiskInfoUfsInterfaceGuid)) {
//
// Physical SCSI bus does not support this data class.
//
@@ -3171,7 +3169,7 @@ ScsiDiskInfoWhichIde ( {
SCSI_DISK_DEV *ScsiDiskDevice;
- if (CompareGuid (&This->Interface, &gEfiDiskInfoScsiInterfaceGuid)) {
+ if (CompareGuid (&This->Interface, &gEfiDiskInfoScsiInterfaceGuid) || CompareGuid (&This->Interface, &gEfiDiskInfoUfsInterfaceGuid)) {
//
// This is not an IDE physical device.
//
@@ -3301,6 +3299,10 @@ InitializeInstallDiskInfo ( return;
}
} while (--IdentifyRetry > 0);
+ } else if ((DevicePathType (ChildDevicePathNode) == MESSAGING_DEVICE_PATH) &&
+ (DevicePathSubType (ChildDevicePathNode) == MSG_UFS_DP)) {
+ CopyGuid (&ScsiDiskDevice->DiskInfo.Interface, &gEfiDiskInfoUfsInterfaceGuid);
+ break;
}
DevicePathNode = ChildDevicePathNode;
}
diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf index b3e40fd981..ec96aa6f92 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf @@ -63,6 +63,7 @@ gEfiDiskInfoScsiInterfaceGuid ## SOMETIMES_PRODUCES ## UNDEFINED
gEfiDiskInfoIdeInterfaceGuid ## SOMETIMES_PRODUCES ## UNDEFINED
gEfiDiskInfoAhciInterfaceGuid ## SOMETIMES_PRODUCES ## UNDEFINED
+ gEfiDiskInfoUfsInterfaceGuid ## SOMETIMES_PRODUCES ## UNDEFINED
# [Event]
# EVENT_TYPE_RELATIVE_TIMER ## CONSUMES
|