Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

More Info on Driver Writing and Debugging


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/


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

storport not support ioctl pass through

Devic_wenDevic_wen Member Posts: 2

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?

Comments

  • Devic_wenDevic_wen Member Posts: 2

    @Devic_wen said:
    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?

    https://github.com/hreinecke/sg3_utils/blob/master/lib/sg_pt_win32.c

  • Girish_BasrurGirish_Basrur Member Posts: 98

    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.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

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 24 January 2022 Live, Online
Internals & Software Drivers 7 February 2022 Live, Online
Kernel Debugging 21 March 2022 Live, Online
Developing Minifilters 23 May 2022 Live, Online