Windows XP I/O subsystem bug???

Hi,

I was developing some SPTI code and found the behavour of the Windows XP
system… say… very questionable.

I have only one ATAPI device in the system attached to primary IDE
controller, secondary IDE controller is free. So \.\Scsi0: has one device
and \.\Scsi1: has no devices at all. And here is the problem: when
retreiving SCSI inquiry data by calling IOCTL_SCSI_GET_INQUIRY_DATA
immediately after calling IOCTL_SCSI_RESCAN_BUS with the same \.\Scsi1:
the DeviceIoControl() returns messy inquiry buffer. It happens only one
time from 5 or 6 and does not happend at all if no call to rescan bus used
or one second Sleep() inserted between two IOCTL calls. I’ve modified DDK
SPTI.c sample (inserted IOCTL_SCSI_RESCAN_BUS call before
IOCTL_SCSI_GET_INQUIRY_DATA) and the STPI.c behaves in the same way. So is
this a XP bug or I have problems with hands??? Did anybody see the same
behavour?

Regards,
Anton


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> retreiving SCSI inquiry data by calling IOCTL_SCSI_GET_INQUIRY_DATA

immediately after calling IOCTL_SCSI_RESCAN_BUS with the same \.\Scsi1:
the DeviceIoControl() returns messy inquiry buffer. It happens only one
time from 5 or 6 and does not happend at all if no call to rescan bus used
or one second Sleep() inserted between two IOCTL calls.

Maybe the XP’s SCSIPORT/ATAPI/STORPORT bug.

On w2k, IOCTL_SCSI_RESCAN_BUS first does re-INQUIRY synchronously, and then calls IoInvalidateDeviceRelations.
On XP, they could rewrite this path to do the INQUIRY in MN_QUERY_RELATIONS and reduce IOCTL_SCSI_RESCAN_BUS to
IoInvalidateDeviceRelations only.

If yes - then IOCTL_SCSI_RESCAN_BUS initiates an async operation which is not known where to complete. Calling
IOCTL_SCSI_GET_INQUIRY_DATA while this is in progress will return junk.

I do not know whether this is really so, but it can be so.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com