none
Is IOCTL_SCSI_PASS_THROUGH request synchronous always? RRS feed

  • Question

  • Hi,

    I came across the following article from Microsoft recently

    https://support.microsoft.com/en-us/kb/251369

    It is mentioned as below.

    "The SPT requests are always synchronous. Even if the caller has specified overlapped I/O (FILE_FLAG_OVERLAPPED)

    and passed the overlapped structure to the DeviceIoControl call, the ScsiPort driver will block the SPT request until the SCSI device completes it."

    In case if we are creating multithreaded application and issues SPT requests from multiple threads simultaneously, Can't we achieve asynchronous functionality.

    Please let me know whether this is applicable for Storport driver also.

    Kindly clarify this.

    Thanks & Regards,

    Raphel

    Tuesday, July 26, 2016 6:45 AM

Answers

  • As far as I know if you issue a SPT request to a particular controller the ScsiPort/Storport framework will serialize the requests and do them in a synchronous manner.  Even if you are using multiple threads, only one request will be handled at a time and in a synchronous manner.  Think about this, many SCSI devices have requirements of what can be sent at time, the safest way to do this is serialize the requests.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Tuesday, July 26, 2016 2:50 PM

All replies

  • As far as I know if you issue a SPT request to a particular controller the ScsiPort/Storport framework will serialize the requests and do them in a synchronous manner.  Even if you are using multiple threads, only one request will be handled at a time and in a synchronous manner.  Think about this, many SCSI devices have requirements of what can be sent at time, the safest way to do this is serialize the requests.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Tuesday, July 26, 2016 2:50 PM
  • Thanks Don Burn for clarification.

    Regards,

    Raphel

    • Marked as answer by raphel78 Wednesday, July 27, 2016 5:05 AM
    • Unmarked as answer by raphel78 Wednesday, July 27, 2016 5:05 AM
    Wednesday, July 27, 2016 5:05 AM