I am seeing a loss of sense data returned from StorPort SCSI mini-port drivers. It appears that the StorPort SRB SenseInfoBufferLength field is getting set to 0x14
before it arrives at the mini-port driver no matter what value is specified in the request.
The requests may be sent via IOCTL_SCSI_PASS_THROUGH_DIRECT from a user application, or from another driver via an IRP built with IoBuildAsynchronousFsdRequest()
and major function IRP_MJ_SCSI. The sense buffer in both cases is sized at 0xFF bytes. When the SRB gets to the miniport driver the SRB SenseInfoBufferLength is always 0x14 no matter what its orignal value was. The proper sense buffer address is being used because I can return data to the caller in the sense buffer at offsets >0x14. The identical code works properly with ScsiPort mini-port drivers under Windows XP. I have seen this behavior in Windows Vista and Windows 7. I have not tested server versions.
My current work-around is to return the amount of sense data needed regardless of SenseInfoBufferLength, but there are times when the SenseInfoBufferLength field is valid and should be respected by the mini-port driver.
Has anyone run into this before or have a solution? Sense buffer lengths >0x14 are required to support descriptor based sense data, or devices which can return more sense data.