Hello,
I am writing a user application program to scan hundreds of SCSI drives
been
connected and/or removed. I use IOCTL_SCSI_RESCAN_BUS to force scan (suppose
to
invalidate the device list in SCSIPort driver) and then
IOCTL_SCSI_GET_INQUIRY_DATA
to get the new list. However I get the stale data (i.e the device list prior
to the
drives been connected and/or removed). After I call IOCTL_SCSI_RESCAN_BUS
and
IOCTL_SCSI_GET_INQUIRY_DATA several loops (each time the number of loops
changes),
IOCTL_SCSI_GET_INQUIRY_DATA returns the correct list of drives. Using the
SCSI
Analyzer it has been confirmed that IOCTL_SCSI_RESCAN_BUS send REPORT_LUNS,
then several INQUIRY command (the correct data is returned for all the new
drives connected).
Is there any way to prevent getting the stale device list? Is there a way to
force clear the stale
device list in the scsiport driver?. This is a major issue for the
application program as it does not
know the number of loops it has to issue the IOCTLs to get all the new
device list.
Regards
Raj