https://git.reactos.org/?p=reactos.git;a=commitdiff;h=194df1ba58c74d0dd3084…
commit 194df1ba58c74d0dd3084c7b88e7608b49298ac4
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Mon Oct 16 20:05:27 2017 +0200
[STORPORT] Implement StorPortSetBusDataByOffset.
CORE-13866
---
drivers/storage/port/storport/storport.c | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/drivers/storage/port/storport/storport.c
b/drivers/storage/port/storport/storport.c
index 170c4eb678..706b0b50e4 100644
--- a/drivers/storage/port/storport/storport.c
+++ b/drivers/storage/port/storport/storport.c
@@ -1005,7 +1005,7 @@ StorPortResumeDevice(
/*
- * @unimplemented
+ * @implemented
*/
STORPORT_API
ULONG
@@ -1019,9 +1019,29 @@ StorPortSetBusDataByOffset(
_In_ ULONG Offset,
_In_ ULONG Length)
{
- DPRINT1("StorPortSetBusDataByOffset()\n");
- UNIMPLEMENTED;
- return 0;
+ PMINIPORT_DEVICE_EXTENSION MiniportExtension;
+ PBUS_INTERFACE_STANDARD Interface;
+ ULONG ReturnLength;
+
+ DPRINT1("StorPortSetBusData(%p %lu %lu %lu %p %lu %lu)\n",
+ DeviceExtension, BusDataType, SystemIoBusNumber, SlotNumber, Buffer, Offset,
Length);
+
+ MiniportExtension = CONTAINING_RECORD(DeviceExtension,
+ MINIPORT_DEVICE_EXTENSION,
+ HwDeviceExtension);
+ DPRINT1("DeviceExtension %p MiniportExtension %p\n",
+ DeviceExtension, MiniportExtension);
+
+ Interface =
&MiniportExtension->Miniport->DeviceExtension->BusInterface;
+
+ ReturnLength = Interface->SetBusData(Interface->Context,
+ BusDataType,
+ Buffer,
+ Offset,
+ Length);
+ DPRINT1("ReturnLength: %lu\n", ReturnLength);
+
+ return ReturnLength;
}