From 114750b9af949847ebe8611762f035f2f5e74be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Mon, 26 Jun 2023 07:50:45 +0200 Subject: [PATCH] More experiments --- README.md | 2 ++ SmartArrayControllerTool/SmartArrayControllerTool.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3cd111b..04ff146 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Heavily work in progress 🔥 The ACU sends a couple of `IOCTL_SCSI_MINIPORT` IOCTLs with custom payloads on controller selection; this is received and handled by the `HpSAMD.sys` driver. So far cross-checking the payload format with the well-known Linux sources hasn't yielded any success; I assume when `IOCTL_SCSI_MINIPORT` is used, the payload isn't what 1:1 gets sent to the controller, unlike `IOCTL_SCSI_PASS_THROUGH` which isn't what the ACU uses. Next step might be trying to port over the Linux CCISS example requests to the Windows SCSI API by using `IOCTL_SCSI_PASS_THROUGH` to try if the controller then responds with the same packet structure as it would under Linux. +So far trying to get a `IOCTL_SCSI_PASS_THROUGH` for controller identification to work results in a `ERROR_IO_DEVICE` 1117 (0x45D). + ## 3rd party sources - [HP ProLiant Array Configuration Utility for Windows 64-bit](https://support.hpe.com/connect/s/softwaredetails?language=en_US&softwareId=MTX_669f83062c7b492083c2aa7125) diff --git a/SmartArrayControllerTool/SmartArrayControllerTool.cpp b/SmartArrayControllerTool/SmartArrayControllerTool.cpp index 446ae8e..29be3a6 100644 --- a/SmartArrayControllerTool/SmartArrayControllerTool.cpp +++ b/SmartArrayControllerTool/SmartArrayControllerTool.cpp @@ -132,7 +132,7 @@ int wmain(int argc, wchar_t* argv[]) sptwb.spt.CdbLength = 10; sptwb.spt.SenseInfoLength = SPT_SENSE_LENGTH; sptwb.spt.DataIn = SCSI_IOCTL_DATA_IN; - sptwb.spt.DataTransferLength = 192; + sptwb.spt.DataTransferLength = SPTWB_DATA_LENGTH; sptwb.spt.TimeOutValue = 120; sptwb.spt.DataBufferOffset = offsetof(SCSI_PASS_THROUGH_WITH_BUFFERS, ucDataBuf); sptwb.spt.SenseInfoOffset = offsetof(SCSI_PASS_THROUGH_WITH_BUFFERS, ucSenseBuf); @@ -150,7 +150,7 @@ int wmain(int argc, wchar_t* argv[]) &sptwb, sizeof(SCSI_PASS_THROUGH), &sptwb, - length, + sizeof(SCSI_PASS_THROUGH_WITH_BUFFERS), &returned, NULL );