summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiUsbLib
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/UefiUsbLib')
-rw-r--r--MdePkg/Library/UefiUsbLib/Hid.c16
-rw-r--r--MdePkg/Library/UefiUsbLib/UefiUsbLib.inf3
-rw-r--r--MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h1
-rw-r--r--MdePkg/Library/UefiUsbLib/UsbDxeLib.c18
4 files changed, 21 insertions, 17 deletions
diff --git a/MdePkg/Library/UefiUsbLib/Hid.c b/MdePkg/Library/UefiUsbLib/Hid.c
index 2e36d2bdff..153c03b7b0 100644
--- a/MdePkg/Library/UefiUsbLib/Hid.c
+++ b/MdePkg/Library/UefiUsbLib/Hid.c
@@ -73,7 +73,7 @@ UsbGetHidDescriptor (
UsbIo,
&Request,
EfiUsbDataIn,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
HidDescriptor,
sizeof (EFI_USB_HID_DESCRIPTOR),
&Status
@@ -133,7 +133,7 @@ UsbGetReportDescriptor (
UsbIo,
&Request,
EfiUsbDataIn,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
DescriptorBuffer,
DescriptorLength,
&Status
@@ -188,7 +188,7 @@ UsbGetProtocolRequest (
UsbIo,
&Request,
EfiUsbDataIn,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
Protocol,
sizeof (UINT8),
&Status
@@ -242,7 +242,7 @@ UsbSetProtocolRequest (
UsbIo,
&Request,
EfiUsbNoData,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
NULL,
0,
&Status
@@ -295,7 +295,7 @@ UsbSetIdleRequest (
UsbIo,
&Request,
EfiUsbNoData,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
NULL,
0,
&Status
@@ -350,7 +350,7 @@ UsbGetIdleRequest (
UsbIo,
&Request,
EfiUsbDataIn,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
Duration,
1,
&Status
@@ -413,7 +413,7 @@ UsbSetReportRequest (
UsbIo,
&Request,
EfiUsbDataOut,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
Report,
ReportLen,
&Status
@@ -478,7 +478,7 @@ UsbGetReportRequest (
UsbIo,
&Request,
EfiUsbDataIn,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
Report,
ReportLen,
&Status
diff --git a/MdePkg/Library/UefiUsbLib/UefiUsbLib.inf b/MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
index fdca45dd8c..105a54482e 100644
--- a/MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
+++ b/MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
@@ -40,4 +40,7 @@
[LibraryClasses]
DebugLib
BaseMemoryLib
+ PcdLib
+[Pcd]
+ gEfiMdePkgTokenSpaceGuid.PcdUsbTransferTimeoutValue \ No newline at end of file
diff --git a/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h b/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h
index b102d28640..62d75526ba 100644
--- a/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h
+++ b/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h
@@ -21,6 +21,7 @@
#include <Library/UefiUsbLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
#include <IndustryStandard/Usb.h>
diff --git a/MdePkg/Library/UefiUsbLib/UsbDxeLib.c b/MdePkg/Library/UefiUsbLib/UsbDxeLib.c
index e6ba6295ce..af45051055 100644
--- a/MdePkg/Library/UefiUsbLib/UsbDxeLib.c
+++ b/MdePkg/Library/UefiUsbLib/UsbDxeLib.c
@@ -73,7 +73,7 @@ UsbGetDescriptor (
UsbIo,
&DevReq,
EfiUsbDataIn,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
Descriptor,
DescriptorLength,
Status
@@ -133,7 +133,7 @@ UsbSetDescriptor (
UsbIo,
&DevReq,
EfiUsbDataOut,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
Descriptor,
DescriptorLength,
Status
@@ -188,7 +188,7 @@ UsbGetInterface (
UsbIo,
&DevReq,
EfiUsbDataIn,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
AlternateSetting,
2,
Status
@@ -241,7 +241,7 @@ UsbSetInterface (
UsbIo,
&DevReq,
EfiUsbNoData,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
NULL,
0,
Status
@@ -293,7 +293,7 @@ UsbGetConfiguration (
UsbIo,
&DevReq,
EfiUsbDataIn,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
ConfigurationValue,
2,
Status
@@ -343,7 +343,7 @@ UsbSetConfiguration (
UsbIo,
&DevReq,
EfiUsbNoData,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
NULL,
0,
Status
@@ -420,7 +420,7 @@ UsbSetFeature (
UsbIo,
&DevReq,
EfiUsbNoData,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
NULL,
0,
Status
@@ -498,7 +498,7 @@ UsbClearFeature (
UsbIo,
&DevReq,
EfiUsbNoData,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
NULL,
0,
Status
@@ -577,7 +577,7 @@ UsbGetStatus (
UsbIo,
&DevReq,
EfiUsbDataIn,
- TIMEOUT_VALUE,
+ PcdGet32 (PcdUsbTransferTimeoutValue),
DeviceStatus,
2,
Status