Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
Use WDK10 and windows server 2019.
I created a physical miniport for storport, our miniport can received IOCTL_SCSI_MINIPORT request, but can't receive IOCTL_SCSI_PASS_THROUGH.
I use the sg_utils to test my miniport disk and system disk,(sg_readcap use IOCTL_SCSI_PASS_THROUGH):
https://sg.danny.cz/sg/sg3_utils.html#__RefHeading___Toc611_3724309425 -->sg_pt_win32.c
sg_readcap.exe output for My miniport disk:
"Windows DeviceIoControl error=87"
"read capacity (10)": transport: ????????"
sg_readcap.exe output for system disk: Everything was in line with expectations
“Last Logical block address=167772159 (0x9ffffff), Number of blocks=167772160”
"Logical block length=512 bytes"
who can help me? why my miniport cann't receive IOCTL_SCSI_PASS_THROUGH/IOCTL_SCSI_PASS_THROUGH_DIRECT request?
Upcoming OSR Seminars | ||
---|---|---|
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead! | ||
Writing WDF Drivers | 12 September 2022 | Live, Online |
Internals & Software Drivers | 23 October 2022 | Live, Online |
Kernel Debugging | 14 November 2022 | Live, Online |
Developing Minifilters | 5 December 2022 | Live, Online |
Comments
https://github.com/hreinecke/sg3_utils/blob/master/lib/sg_pt_win32.c
Storport actually handles IOCTL_SCSI_PASS_THROUGH/IOCTL_SCSI_PASS_THROUGH_DIRECT, creates an SRB w/ SRB_FUNCTION_EXECUTE_SCSI and then forwards them to miniport. So, your miniport always sees an SRB.
The stack trace in Windbg (breakpoint in your miniport's BuildIo/StartIo) should show the details.